[TYPO3-dev] 4.3 PageIncludes
Sebastian Gebhard
sebastian.gebhard at googlemail.com
Fri Oct 30 22:55:27 CET 2009
Thomas "Thasmo" Deinhamer schrieb:
> I think it's still better to split CSS and JS, as it's
> imho more flexible to extend/modify/read used inside
> frontend extensions or plugins. And I guess the usage
> needs it. For example I want to delete all JS files -
> for thce print view:
> page.references.scripts >
>
> Otherwise I would need to KILL all files seperatly:
> page.references.library >
> page.references.base >
>
Good point. I have an idea regading this - I don't know if it's clever.
Do not force the wbemaster to group the scripts by type but give him
the oppurtunity.
E.g. you can write:
# Ungrouped
page.references{
reset = fileadmin/css/reset.css
base = fileadmin/css/base.css
newsstyles = fileadmin/css/news.css
newsjs = fileadmin/js/newsfunctions.js
jquery = fileadmin/js/jquery.js
}
page.references >
# Grouped by type
page.references{
styles{
reset = fileadmin/css/reset.css
base = fileadmin/css/base.css
newsstyles = fileadmin/css/news.css
}
scripts{
newsjs = fileadmin/js/newsfunctions.js
jquery = fileadmin/js/jquery.js
}
}
page.references >
# Grouped by subject
page.references{
common{
jquery = fileadmin/js/jquery.js
reset = fileadmin/css/reset.css
base = fileadmin/css/base.css
}
news{
newsjs = fileadmin/js/newsfunctions.js
newsstyles = fileadmin/css/news.css
}
}
page.references >
# Grouped by subject and type
page.references{
common{
scripts{
jquery = fileadmin/js/jquery.js
}
styles{
reset = fileadmin/css/reset.css
base = fileadmin/css/base.css
}
}
news{
scripts.newsjs = fileadmin/js/newsfunctions.js
styles.newsstyles = fileadmin/css/news.css
}
}
If a property has content (a file assigned) it is a reference.
If it has no content, but only subproperties it a reference group.
The names of the reference groups can be chosen arbitrarily.
Reference groups can be nested.
This way the setup for very basic websites with just a stylesheet
is short and intuitive, on the other hand you have the possbility
to structure and manage your references as you on more complex
websites.
More information about the TYPO3-dev
mailing list