[TYPO3-core] RFC #13074: Feature: stdWrap for inclusion of CSS and JS files via pageRenderer
Susanne Moog
typo3 at susannemoog.de
Sun Jan 17 20:29:38 CET 2010
Reminder #1
Am 10.01.2010 14:08, schrieb Susanne Moog:
> This is an SVN patch request.
>
> Type: Feature
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=13074
>
> Branches:
> trunk
>
> Problem:
> From the bugtracker:
> "It should be useful to have a stdwrap properties in page.includeJS
> includeCSS includeFooterJS ... to be able to use "if" conditions in
> every file included.
> For example it's very common to load a JS/CSS lib if you insert a FCE,
> you could use page.headerData but it isnt as clean as includeJS"
>
> Solution:
> Add stdWrap possibilities to CSS and JS inclusion methods, in TS to the
> properties:
> - includeCSS
> - includeJSlibs
> - includeJSFooterlibs
> - includeJS
> - includeJSFooter
>
> Can be used from extensions (PHP), too.
>
> How to test:
> Use some TS like the following and look at your source code (adjust the
> filenames to existing ones):
>
> page {
> includeCSS {
> file1 = fileadmin/template/test.css
> file1.stdWrap.wrap = <!-- test | -->
> }
> includeJS {
> file1 = fileadmin/template/test.js
> file1.stdWrap.wrap = <!-- test | -->
> }
> includeJSFooter {
> file1 = fileadmin/template/test2.js
> file1.stdWrap.wrap = <!-- test2 | -->
> }
> includeJSFooterlibs {
> file1 = fileadmin/template/test3.js
> file1.stdWrap.wrap = <!-- test3 | -->
> }
> }
>
> Test from extension:
> Use f.e. the pagerenderers addCSSfile with a stdWrap config array as
> last parameter:
>
> $pageRenderer->addCssFile($file, 'stylesheet', 'screen', '', TRUE,
> FALSE, '', $stdWrap)
>
>
> Documentation:
> Add stdWrap to the properties of
> - includeCSS
> - includeJSlibs
> - includeJSFooterlibs
> - includeJS
> - includeJSFooter
> in chapter 1.6 at "PAGE":
> ..stdWrap - stdWrap properties, processed after allWrap
>
> Best regards,
>
> Susanne
More information about the TYPO3-team-core
mailing list