[TYPO3-templavoila] switch/change template based on screen resolution
admin at commandline.ch
Thu Sep 7 09:47:12 CEST 2006
Felix Natter schrieb:
> previously I have used "modern template building" with cc_screenres to
> change a template's widths/heights (with markers like
> width=###MAINTABLE_WIDTH### in the HTML) based on the screen resolution
> (800x600 or 1024x768).
> Now I switched to tv and I am wondering what would be the best way
> to do this? I'd be happy with either:
> - switching the TO based on resolution (2 resolutions are enough)
> - modify the TO based on resolution (change widths/heights in the HTML)
Personaly I wouldn't use inline styles or HTML attributes like "width"
within the template, because you can do everything with CSS much easier
I would suggest:
1. Make two CSS stylesheets, one for 800x600 and one for 1024x768.
2. Select the stylsheets based on the screen resolution.
If you set the stylesheets by TypoScript within the PAGE object it
should be possible to switch them with cc_screenres (I didn't use the
stylesheets directly with js. This way you don't need to change anything
within TYPO3 and it's much easier to solve...
This way you don't need to change anything on templavoila, which is much
Greetings from switzerland
More information about the TYPO3-project-templavoila