Adding Individual Sidebar boxes/features

13 posts by 4 authors in: Forums > CMS Builder
Last Post: April 18, 2011   (RSS)

By Jason - April 15, 2011

Hi Tina,

To make all of this easier, it would probably be best to combine all of your files into 1, side bar file. That way we can be passing information around a lot easier.

So, if I understand correctly, we have the potential to show a maximum of 6 boxes that are spread over 3 sections. We want to show to randomly show 3 of those. Is that right?

If so, this is what I would do, since the slide show and the testimonials are only going to ever show 1 box, but the general text boxes can show up to 4, we should start with the general text boxes.

What we can do is get PHP to choose a random number for us between 1 - 3 to choose how many general text boxes to show.

For example:

$numberOfGeneralTextBoxes = rand(1, 3);

This will let us know how many general text boxes to show.

As for the other two types, the breakdown would go like this:

- if random number = 1, show the slide show and the testimonials box
- if random number = 2, show either the slide show or the random testimonials box
- if random number = 3, we already hit our maximum, so only show the general text boxes.

Does this sound like it would work for you?

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Jason - April 18, 2011

Hi Tina,

Yes, you could use one file that includes all of your other files.

Let me know how that works out for you.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/