not display specific (parent) record in category menu

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 7, 2011   (RSS)

Re: [buttermilk] not display specific (parent) record in category menu

By Jason - May 6, 2011

Hi,

If you just want to skip over parent records, you can check the depth field. If the depth field is set to 0, this means the record is a top level category.

You can skip over these records like this:

<ul>
<?php foreach ($servicesRecords as $record): ?>

<?php if ($record['depth'] == 0) { continue; } ?>

<li><a href="<?php echo $record['_link'] ?>"><?php echo $record['name'] ?></a></li>

<?php endforeach; ?>
</ul>


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/

Re: [Jason] not display specific (parent) record in category menu

By buttermilk - May 7, 2011

Pure awesome. That's exactly what I needed.

Thanks, Jason!

Ian