[TYPO3-english] change css class marker based on extension

Curt Grimley curt at cgss.net
Sun Jan 4 15:15:21 CET 2009


Gijs Epping [eFocus] wrote:
> I have a problem with my templates, A designer based templates on css
> classes that are added to the main content wrapping div.
> 
> Example:
> <div class="content inner11">
> 
> I changed this to:
> <div class="content ###WRAPPERCLASS###">
> 
> But some extensions need the class inner5 or inner 9 etc.
> 
> I was tring to solve this in typoscript but this is not working.
> [globalVar = TSFE:page|tx_extension_pi8]
>     obj.pageclass = TEXT
>     obj.pageclass.value = inner5
> [end]
> 
> OR
> 
> [userFunc = user_checkInner5()]
>     obj.pageclass = TEXT
>     obj.pageclass.value = inner5
> [end]
> 
> marks.WRAPPERCLASS < obj.pageclass
> 
> Is there a way to check wich extension is loaded on the page? So i can
> configure the class based on the loaded extension.
> 

Why not have each extension insert its own appropriate constant or setup
code? (You can experiment with the kickstarter to see how to do that.)

Then the template doesn't have to do anything.

Curt


More information about the TYPO3-english mailing list