[TYPO3-core] RFC #13074: Feature: stdWrap for inclusion of CSS and JS files via pageRenderer

Susanne Moog typo3 at susannemoog.de
Sun Feb 7 17:07:38 CET 2010


Hey Steffen,

sorry, took a bit longer to get back to this thread.

Am 25.01.2010 21:42, schrieb Steffen Gebert:
> Hi Susanne,
> 
> you need this for conditional comments, don't you?
> Or do you have any other ideas, what could be done with it?

I don't need it for the conditional comments, for that I can just use
allWrap. But with stdWrap we can do some if magic, including certain css
/ js depending on fields set on the page record for example. Also look
in the bugtracker, the original request had something to do with Templa
Voilá (can't say if that makes sense as use case, as I don't use it).

> But as it works and as stdWrap never hurts, +1 by reading and testing
> 
> P.S: What I like very much is the idea of a $param array (often seen in
> JS frameworks). So you don't have functions with countless parameters,
> but a config array, which is passed.
> So it's easier, to call the function e.g. set stdWrap, but not the allWrap.
> But I don't know, if we want this revolutionary concept in TYPO3 ;)

Hehe, in fact, I just did not think of it, but you're right, it's all in
all a cleaner concept. So find attached a v2 which doesn't use a param
stdWrap but additionalParams.stdWrap, so we can add more params to the
array later if needed. (I called it additionalParams as there are
already params that we can't change anymore like allWrap and forceOnTop)

New test case:

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.additionalParams.stdWrap.wrap = <!-- test | -->
  }
  includeJS {
    file1 = fileadmin/template/test.js
    file1.additionalParams.stdWrap.wrap = <!-- test | -->
  }
  includeJSFooter {
    file1 = fileadmin/template/test2.js
    file1.additionalParams.stdWrap.wrap = <!-- test2 | -->
  }
  includeJSFooterlibs {
    file1 = fileadmin/template/test3.js
    file1.additionalParams.stdWrap.wrap = <!-- test3 | -->
  }
}

Best regards,

Susanne
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 13074_feature_stdWrapPageRenderer_v2.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100207/49fd1761/attachment-0001.asc>


More information about the TYPO3-team-core mailing list