streetparade streetparade - 9 months ago 147
Smarty Question

Smarty Section Making the selected Link Bold

How can I make the selected link from the List below, bold, that you see you are on Page ex. 3 or 5

With this code, If you click on a Link you don't know on which page you are.

The smarty code looks like this;

{section name="sitelinks" start=0 loop=$total->sitelinks}
<span class='tag'>
<a href='/member/{$campaign->id}?start={$smarty.section.sitelinks.index*$limit}&limit={$limit}&sort={$sort}&sortDir={$sortDir}'>
{$smarty.section.sitelinks.index}
</a>
</span>
{/section}

Answer Source

Hmm.. no one answered this question. I realized that there was a var $start. I did

{if $start/$limit == 0}<b>{$smarty.section.sitelinks.index}</b>
{else}{$smarty.section.sitelinks.index}{/if}

And it worked.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download