Re: [drewh01] Creating a dynamic dropdown menu
Hi,
First, you need to change your getRecords query, as the function doesn't use the "categoryFormat" option.
Try this:
list($allPages, $selectedPage) = getRecords(array(
'tableName' => 'festival_pages',
'allowSearch' => false,
));
Then in your loop, you still have an extra "else" block and some left over code.
Try this:
<ul>
<?php foreach ($allPages as $page): ?>
<?php $link = $page['url'] ? $page['url'] : $page['_link']; ?>
<li><a href="<?php echo $link; ?>"> <?php echo $page['title'] ?> </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/