Need dynamic include list for sidebar

4 posts by 2 authors in: Forums > CMS Builder
Last Post: April 16, 2013   (RSS)

By Toledoh - April 16, 2013

Hey Ron.

I create various "includes" such as _include_contact.php. _include_news.php etc.

Then, for each content page of the site, I may have a select list with options;

contact|Contact Us

news|Latest News

etc

Then in the code for the page: if select = contact, then include _include_contact.php

Each page may have room for 3 includes in the side content, so I create 3 select boxes - this way they choose the order.

There's probably better (more efficient) ways - but this works for me.

Cheers

Cheers,

Tim (toledoh.com.au)

By rconring - April 16, 2013

Thanks for the reply, Tim!

That was somewhat my first plan, but since I need to allow for ordering of placement, I had to go back to the drawing board.  I then considered placing a group of select fields for each page so they could be ordered.  That limits the number of selections per page to however many fields I supply.  I am now looking into using a related table to hold the data for each page.  I am still open to suggestions!

Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987

By Toledoh - April 16, 2013

Hey Ron,

I've had some custom stuff done by iTools that allows me to select "people" from a table to display in a that page (department) and then, from within the editor of that page, have the click and drag ordering in the related field.  It's magic to behold!  skype me (tim at toledoh dot com dot au) if you want to see, but the site's not live as yet so I can't send a link.

Cheers,

Tim (toledoh.com.au)