Dynamically Include Modules Based On Template Color - Joomla! Forum - community, help and support
yea, question interesting.
this apparently works:
but doesn't:
the first part apparently works because there's dead space develops on particular sub-section determined color i'm using test with:
http://dreammakersguild.com/furbotvx
the other 2 available sections [adm (aka home)] , [peppermint games] not have modules assigned "color" yet, content runs full width of site. [furbot] has hole menu module supposed be. how one, use variable jdoc:include command dynamically select modules supposed appear "color"?
p.s. rather not use switch statement because means if add more "colors", i'd have remember amend switch statement include them.
this apparently works:
code: select all
// template color needs above module checking
$color = $this->params->get('templatecolor');
$colormenu = $color . "menu-1";
// check modules
$showleft = ($this->countmodules($colormenu) or $this->countmodules('position-4') or $this->countmodules('position-7') or $this->countmodules('position-5'));
but doesn't:
code: select all
<jdoc:include type="modules" name="$colormenu" style="beezdivision" headerlevel="3" />
the first part apparently works because there's dead space develops on particular sub-section determined color i'm using test with:
http://dreammakersguild.com/furbotvx
the other 2 available sections [adm (aka home)] , [peppermint games] not have modules assigned "color" yet, content runs full width of site. [furbot] has hole menu module supposed be. how one, use variable jdoc:include command dynamically select modules supposed appear "color"?
p.s. rather not use switch statement because means if add more "colors", i'd have remember amend switch statement include them.
you going have output contents of $colormenu variable:
code: select all
<jdoc:include type="modules" name="<?php echo $colormenu; ?>" style="beezdivision" headerlevel="3" />
Comments
Post a Comment