Current record

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 17, 2010   (RSS)

By Toledoh - September 16, 2010

Hi Guys.

Can you tell me what is wrong here?

On the page: http://brendanread.com.tmp.anchor.net.au/portfolioGallery.php?num=1 I have the scondary navigation bottom left.

Each button is a list item, and I am trying to tag the <a> with "id="current" for the current record.

I have used the following code, but all the items are being flagged.... what am I doing wrong?

<div id="leftE">
<ul id="navlist">
<li ><a <?php if($portfolioRecord['num']=1): ?> id="current"<?php endif ?> href="portfolioGallery.php?num=1"><img src="images/nav/galleryPeople.png"></a></li>
<li ><a <?php if($portfolioRecord['num']=5): ?> id="current"<?php endif ?> href="portfolioGallery.php?num=5"><img src="images/nav/gallerySport.png"></a></li>
<li ><a <?php if($portfolioRecord['num']=6): ?> id="current"<?php endif ?> href="portfolioGallery.php?num=6"><img src="images/nav/galleryFood.png"></a></li>
<li ><a <?php if($portfolioRecord['num']=7): ?> id="current"<?php endif ?> href="portfolioGallery.php?num=7"><img src="images/nav/galleryCorporate.png"></a></li>
<li ><a <?php if($portfolioRecord['num']=10): ?> id="current"<?php endif ?> href="portfolioGallery.php?num=10"><img src="images/nav/galleryIndustry.png"></a></li>
<li ><a <?php if($portfolioRecord['num']=8): ?> id="current"<?php endif ?> href="portfolioGallery.php?num=8"><img src="images/nav/galleryLifestyle.png"></a></li>
<li ><a <?php if($portfolioRecord['num']=9): ?> id="current"<?php endif ?> href="portfolioGallery.php?num=9"><img src="images/nav/galleryTravel.png"></a></li>
<li ><a <?php if($portfolioRecord['num']=11): ?> id="current"<?php endif ?> href="portfolioGallery.php?num=11"><img src="images/nav/galleryFashion.png"></a></li>
<li ><a <?php if($portfolioRecord['num']=12): ?> id="current"<?php endif ?> href="portfolioGallery.php?num=12"><img src="images/nav/galleryBlack.png"></a></li>
</ul>
</div>

Cheers,

Tim (toledoh.com.au)

Re: [flamerz] Current record

By Toledoh - September 17, 2010

Brilliant! Thanks heaps!
Cheers,

Tim (toledoh.com.au)