Remove a menu link but display other links ?

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 4, 2008   (RSS)

By avrom - July 4, 2008 - edited: January 15, 2021

Hi Dave,

How are you ? The page I want to modify is


If you look at the "Projects" box on the right, you will see I have all my menu links for the multi-page record "Titles". What I want to do is remove the link "Projects" which is record ?4 "Projects". Sorry haven't been working on CMS Builder in a while so not quite right in my terminology there.

Here is the CMS Builder code:

<?php
$options = array();
$options['tableName'] = 'projects';
$options['titleField'] = '';
$options['viewerUrl'] = 'projects.php';
$options['perPage'] = ''; // (optional) The number of records to display per page. Example: '5'; Defaults to 10.
$options['orderBy'] = '';
$options['pageNum'] = ''; // (optional) Page number of results to display. Example: '1'; Defaults to ?page=# value, or 1 if undefined
$options['where'] = '';
$options['useSeoUrls'] = '';
list($listRows, $listDetails) = getListRows($options);
?>
<p class="p5">
<?php foreach ($listRows as $record): ?>
<a href="<?php echo $record['_link'] ?>"><?php echo $record['title'] ?></a><br />
<?php endforeach ?>
</p>

Thanks so much Dave !!

Avrom

Re: [virgodesign] Remove a menu link but display other links ?

By Dave - July 4, 2008

Hi Avrom, try this (in red):

<?php foreach ($listRows as $record): ?>
<?php if ($record['num'] == 4) { continue; } ?>
<a href="<?php echo $record['_link'] ?>"><?php echo $record['title'] ?></a><br />
<?php endforeach ?>


Let me know if that works for you! :)
Dave Edis - Senior Developer
interactivetools.com