[dev] StyleSheet options
Jan Schneider
jan@horde.org
Wed, 13 Feb 2002 15:29:04 +0100
Zitat von Ramon Kagan <rkagan@yorku.ca>:
> Oh! =)
>
> I see what you mean now. Just one question. The javascript will open a
> new window that will call help.php. Now I can easily get the javascript
> to tag on the style and size and retrieve this information in help.php.
> The only question is when I include common-header.inc how do I pass that
> information (style and size) to it? Sorry about this question (it's
> probably trivial) but I've already extended my coding skills. I'm
> learning php as I go.
You can receive parameters passed by url with the
Horde::getFormValue('para') function.
So what you have to do in common-header.inc is to test if there is a value
passed by url. If so you'll put it in the css link otherwise you take the
value from the users prefs. Of course you can change the test order.
It might look then somehow like this:
<link href="<?= $registry->getParam('webroot', 'horde') ?>/css.php?style=<?
= Horde::getFormValue('style') ? Horde::getFormValue('style') : $prefs-
>getValue('style') ?>" rel="stylesheet" type="text/css" />
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft