Regex removal

13 posts by 2 authors in: Forums > CMS Builder
Last Post: May 14, 2010   (RSS)

By dsternalski - May 14, 2010

Hi,

The file is the curriculumSecondNav.php. Please find attached.

Re: [dsternalski] Regex removal

By Jason - May 14, 2010

Hi,

I think I've found the problem. Your code in curriculumSecondNav.php is outputting the <li> and </li> tags before it checks to see if you should even be outputting a record, replace the code in this file with this:

<ul class="secondNav">
<?php foreach ($allCurriculumRecords as $categoryRecord): ?>
<?php if(!$categoryRecord['featureSelect']) : ?>
<?php echo $categoryRecord['_listItemStart'] ?>
<a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a>
<?php echo $categoryRecord['_listItemEnd'] ?>
<?php endif ?>
<?php endforeach; ?>
</ul>


Give this a try. I think that should take care of the empty <li></li> issue.

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/