[TYPO3] Style switcher

Christopher bedlamhotel at gmail.com
Mon Apr 17 19:52:27 CEST 2006


On 4/17/06, Kevin Renskers <info at dualdot.nl> wrote:
> > You can solve this problem in 2 ways:
> > 1. use only TMENU
> Well then I still have the problem of the graphical headers. Of course I
> can make that text too, but this is one of the best features of Typo3,
> which I do want to use...

Well, if you're willing to use image replacement techniques, I
published a fairly complete solution on the wiki [1]. You'd better
like Typoscript though ;-)

In principle, the same solution is perfectly possible for a TMENU
though I haven't actually built one. But you should be able to use the
same userFunc if you make each menu item as a cObject--something like:

lib.firMenu = HMENU
lib.firMenu {
  1 = TMENU
  1 {
    NO {
      doNotShowLink = 1
      stdWrap.cObject = HTML
      stdWrap.cObject {
        ... build the links,
        ... and the wraps,
        ... and the id / class attributes in here

All of this still means that you're going to have to use something
other than javascript to invoke the style switcher; js can switch the
stylesheet, but it can't instruct TYPO3 to render a different version
of the pages. It seems that you'd need the rendering to be conditional
on some factor like session/cookie/page type (e.g. yellow theme =
index.php&id=53&type=10, blue theme = index.php&id=53&type=20, red
theme = index.php&id=53&type=30).

To see how different page types work, have a look at any of the TS
examples or extensions that generate printable pages using &type=98


[1] http://wiki.typo3.org/index.php/GIFBUILDER_FIR_IMAGES

More information about the TYPO3-english mailing list