[Neos] Order of Scripts and Tags in head
Maxi milian
info at maxguz.de
Tue Nov 11 13:56:47 CET 2014
As indicated in the example below, I would expect that the output is as follows:
1. metadata
2. stylesheets
3. javascript
4. title
But it is:
1. title
2. javascript
3. stylesheets
4. metadata
How could I change the order of scripts and meta-tags in head?
---
Typoscript:
page = Page {
head {
metadata = TYPO3.TypoScript:Template {
templatePath = 'path/to/template'
sectionName = 'metadata'
}
stylesheets.site = TYPO3.TypoScript:Template {
templatePath = 'path/to/template'
sectionName = 'stylesheets'
node = ${node}
}
javascripts.site = TYPO3.TypoScript:Template {
templatePath = 'path/to/template'
sectionName = 'headScripts'
node = ${node}
}
titleTag = TYPO3.TypoScript:Tag {
tagName = 'title'
content = ${q(node).property('title') + ' - Website Name'}
}
}
}
Template:
<head>
<f:section name="metadata">
[...]
</f:section>
<f:section name="stylesheets">
[...]
</f:section>
<f:section name="headScripts">
[...]
</f:section>
</head>
Example:
<head>
<title>Home - Website Name</title>
<script type="text/javascript" src="path/to/javascript.js"></script>
<link rel="stylesheet" href="path/to/stylesheet.css" media="all" />
<meta charset="utf-8"/>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="path/to/favicon.ico" type="image/x-ico; charset=binary">
</head>
More information about the Neos
mailing list