[TYPO3] developing extension for font-size changes
Bernd Wilke
xoonsji02 at sneakemail.com
Thu Mar 29 19:35:33 CEST 2007
On 29 Mar 2007 16:08:06 +0200, Felix Natter wrote
with subject "[TYPO3] developing extension for font-size changes":
> hi,
>
> I need to have buttons on my site for increasing/decreasing font-size.
> There is an extension "dynamicfontsize" for this purpose, but it
> is javascript-based and does not support inc/dec buttons
> (only supports buttons small/normal/large).
>
> I'd like to develop a solution that is server-based (current font-size
> saved in PHP session variable) and that includes a stylesheet file for
> the specified font-size.
>
> I thought I'd write a frontend extension that includes the correct
> stylesheet based on a session variable and the output of which is
> copied into the page header:
> page.headerData.11 < tx_MYEXT_pi1
>
> Now I'd set "larger fontsize button"'s href to
> index.php?id=PID&fontsize=larger and the extension above would
> see this in $_GET and set/adapt the session variable.
>
> This is my first extension. Is this a good approach or can
> this be done more easily?
just some thought on the fly:
font-size is something from CSS.
all font-sizes should depend on one base size (font-size:110%;
font-size:0.75em; ...)
what about some javascript which changes the base size?
can you store the (new) base size in cookies?
+ no PHP, no GET-params and the user may get his own size on the next visit
- needs javascript (but in near future with all those ajax-sites nobody
will escape)
Bernd
--
http://www.bernd-wilke.net
More information about the TYPO3-english
mailing list