Associating links with specific categories

13 posts by 2 authors in: Forums > CMS Builder
Last Post: July 16, 2012   (RSS)

Re: [NigelGordijk] Associating links with specific categories

By Jason - July 16, 2012

Hi Nigel,

Try this technique where you take the first record from the list and output the category label:

<?php $firstRecord = @$our_productsRecords[0]; ?>
<?php if ($firstRecord): ?>
<h2><?php echo $firstRecord['category:label'];?></h2>
<?php endif ?>

<?php foreach ($our_productsRecords as $record): ?>
<p><strong><a href="<?php echo $record['_link'] ?>"><?php echo htmlencode($record['title']) ?></a></strong></p>
<?php endforeach ?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Perfect! Thank you for your patience and help.

http://www.heritageacresnutrition.com/products.php
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net