Is there a better way to link?

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 28, 2013   (RSS)

By Toledoh - June 26, 2013

Hi Guys,

I've currently got a multi-section "Featured Items" which allows you to create items on the home page, give it a title, image, description, then link to another part of the site.  The same function for "Side Items" and another for "Quick Links" etc.

In each of these section editors, I have the follow fields that allows the user to select where they want that record to link to;

separator: "Choose one of the following items"

pulldown-list: select from database / articles / num / title

pulldown-list: select from database / events / num / title

pulldown-list: select from database / pages / num / title

pulldown-list: select from database / report / num / title

I then use the following to link;

<?php if ($record['article']): ?><a href="articleDetails.php?num=<?php echo $record['article'] ?>" class="actionButton"><?php endif ?>

<?php if ($record['report']): ?><a href="reportDetail.php?num=<?php echo $record['report'] ?>" class="actionButton"><?php endif ?>

<?php if ($record['event']): ?><a href="eventDetails.php?num=<?php echo $record['event'] ?>" class="actionButton"><?php endif ?>

<?php if ($record['pages']): ?><a href="pages.php?num=<?php echo $record['pages'] ?>" class="actionButton"><?php endif ?>

Read More</a>

Is there a better way?


Tim (

By Toledoh - June 28, 2013

Cool - thanks for that!


Tim (