zigojacko Posted February 3, 2012 Share Posted February 3, 2012 Hey all, I'm using the Featured Categories module by PrestaFABRIQUE. I need to set individual styling to the featured categories on the homepage. There will only ever be three featured categories on the homepage, but each one needs to be styled separately (colour only that is). The below is the code that inserts the featured categories on the homepage. <ul class="clearfix"> {foreach from=$categs item=c} <li> {if array_key_exists("link_rewrite", $c)} <a href="{$link->getCategoryLink($c.id, $c.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$c.name|escape:'htmlall':'UTF-8'}">{if $c.img != ""}<img src="{$categ_img_loc}{$c.img}-medium.jpg" />{/if}</a><br /> <a href="{$link->getCategoryLink($c.id, $c.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$c.name|escape:'htmlall':'UTF-8'}">{$c.name}</a> {else} <a href="{$link->getCategoryLink($c.id)|escape:'htmlall':'UTF-8'}" title="{$c.name|escape:'htmlall':'UTF-8'}">{if $c.img != ""}<img src="{$categ_img_loc}{$c.img}-medium.jpg" />{/if}</a><br /> <a href="{$link->getCategoryLink($c.id)|escape:'htmlall':'UTF-8'}" title="{$c.name|escape:'htmlall':'UTF-8'}">{$c.name}</a> {/if} </li> {/foreach} </ul> As you'll be able to see, the above gets all categories that are set to featured from the module configuration. I can't see a way I can style the categories individually like this. What I'm needing is the ability to pull in a featured category within it's own <li> class so I can style them. Can anyone advise of a way of doing this please? Thanks in advance. Link to comment Share on other sites More sharing options...
shacker Posted February 6, 2012 Share Posted February 6, 2012 have you contacted the developer? Link to comment Share on other sites More sharing options...
Groove Posted February 12, 2012 Share Posted February 12, 2012 did post but miss-understood. sorry Link to comment Share on other sites More sharing options...
zigojacko Posted February 21, 2012 Author Share Posted February 21, 2012 have you contacted the developer? I have contacted them, am waiting for a reply. Thanks Link to comment Share on other sites More sharing options...
Tecniloco Posted May 3, 2012 Share Posted May 3, 2012 <ul class="clearfix"> {foreach from=$categs item=c} <li> <a href="{$link->getCategoryLink($c.id, $c.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$c.name|escape:'htmlall':'UTF-8'}"> {if $lang_iso == "en"} <img src="{$categ_img_loc}{$c.img}-cathome-en.jpg" /> {elseif $lang_iso == "fr"} <img src="{$categ_img_loc}{$c.img}-cathome-fr.jpg" /> {else} <img src="{$categ_img_loc}{$c.img}-cathome.jpg" /> {/if} </a><br /> </li> {/foreach} </ul> Link to comment Share on other sites More sharing options...
Tecniloco Posted May 3, 2012 Share Posted May 3, 2012 <ul class="clearfix"> {foreach from=$categs item=c} <li> <a href="{$link->getCategoryLink($c.id, $c.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$c.name|escape:'htmlall':'UTF-8'}"> {if $lang_iso == "en"} <img src="{$categ_img_loc}{$c.img}-cathome-en.jpg" /> {elseif $lang_iso == "fr"} <img src="{$categ_img_loc}{$c.img}-cathome-fr.jpg" /> {else} <img src="{$categ_img_loc}{$c.img}-cathome.jpg" /> {/if} </a><br /> </li> {/foreach} </ul> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now