Page 1 of 1

Using Parameters in the Template

Posted: Sun Jul 01, 2007 10:25 am
by mario

I`m trying to use parameters in my template to switch the Frontpage from Summer to Winter.
Everything works fine on the css side but,
I`m not able to switch a module.
I`m trying to use 2 different Imageheader Modules, which will either display summer or winter pictures.

Now if I`m trying to use

Code: Select all

<?php if ($this->countModules('imageheader_t1_<?php echo $this->params->get('SeasonVariation'); ?>')) : ?>
I`m getting an error

Code: Select all

Parse error: parse error, unexpected T_STRING in D:\Xampp\xampp\htdocs\test-beta2\templates\schoenruh_template\index.php on line 50
I`m not a coder, but I guess it is not possible to have a 2nd tag in another tag? - right.
Would there be a different solution for this?
I can use the params to include the right module

Code: Select all

<jdoc:include type="modules" name="imageheader_t1_<?php echo $this->params->get('SeasonVariation'); ?>" style="raw" />

But I would like to check if this module is published.