[TYPO3] Attempting concatenation - syntax issue?
John Kallies
jkallies at majorninth.com
Tue Jun 20 23:06:09 CEST 2006
My extension templates aren't producing HTML to call my style sheets.
I've included the syntax and a little context. I'm using Typo3 3.8.1.
I've found a less elegant workaround to my problem below, but I would
really like to know what I am doing wrong, if anyone is willing to show me.
There are 4 templates in play here...
- siteRoot - only includes basis templates, and a template for the next
level (allowing different front page). Nothing else here.
- globalTS template - used by the siteRoot template. All the heavy
lifting goes here (automaketemplate, tt_news pid, etc.)
- corporateStyle - defines the overall UI/brand of the site. Included by
the siteRoot
- departmentStyle - ext. template on a child page (a couple levels in),
defining department-level UI
The code in use...
----------------------------------------------------------------------------
# From the setup of the globalTS basis template. Trying to do a
# poor-man's concatenation in TypoScript
page.headerData.700 = TEXT
page.headerData.700 {
10.value = <link rel="stylesheet" type="text/css" href="
20.value = {$constants.stylesheet}
30.value = " />
}
[also did this...]
page.headerData.700 = TEXT
page.headerData.700.10.dataWrap = <link rel="stylesheet"
type="text/css" href="{$constants.stylesheet}" />
# From the constants in the corporateStyle basis template
constants.stylesheet =
/fileadmin/templates/corporate/styles_corporate_main.css
# From the constants in the departmentStyle basis template
constants.stylesheet =
/fileadmin/templates/department1/styles_department1_main.css
----------------------------------------------------------------------------
Of course my TS doesn't line wrap like this message.
If I hard code a literal value in page.headerData.700, everything is
fine. So there's something amiss in my constants or setup code.
For reasons discussed on this list, I don't want to use a
page.stylesheet = fileadmin/yadda/yadda.css because I can't control or
readily override the use of a given stylesheet (for IE hacks, et al.).
I think my template architecture is good. I'm guessing there's something
screwy with my faux-concatenation syntax, but I've used this before and
it worked fine. I would be very grateful for some insight.
Many thanks...
John Kallies
More information about the TYPO3-english
mailing list