Adding Individual Sidebar boxes/features

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

By csdesign - March 11, 2011

I'm just starting this site and I want to make sure I have the foundation right. I'm not completely clear on the best way to make this happen so any help would be greatly appreciated!

I've included a screenshot of what I'm trying to accomplish. I have 6 individual boxes/features I would like to include in the sidebar. Easy enough... however, I would like for the client to be able to change the order of the boxes on each page and only display 3 of the six per page.

4 of the boxes will be text only.
1 will have quotes/testimonials that could display randomly if possible, if not, no biggie.
1 will be using a user controlled slideshow script to display a photo and text together.

What's the best way to approach setting all of this up? Should I make each of the boxes their own editor to start with?

Thanks!! Tina

Re: [csdesign] Adding Individual Sidebar boxes/features

By Toledoh - March 12, 2011

Hi Tina.

I've done a similar thing to what I think you are doing (no screenshot).

I used a multi-record section to add "snippets" which consisted of title, text and image. I then randomly ('orderBy' => 'RAND()') display 4 of these records on a page.
Cheers,

Tim (toledoh.com.au)

Re: [csdesign] Adding Individual Sidebar boxes/features

By Damon - March 15, 2011

Hi Tina,

The screenshot didn't get attached. Can you try adding it again so I have a better idea what you are trying to setup?

Thanks!
Cheers,
Damon Edis - interactivetools.com

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

Re: [Damon] Adding Individual Sidebar boxes/features

By csdesign - March 15, 2011

sorry about that - must have gotten click happy!
Attachments:

picture-53.png 68K

Re: [csdesign] Adding Individual Sidebar boxes/features

By Jason - March 16, 2011

Hi Tina,

I think Tim definitely has the right idea. Have a multi-record section where you create 1 record for each "box" you want to display. When you're retrieving those records from the database, you can use code like this:

list($sideBarRecords, $sideBarMetaData) = getRecords(array(
'tableName' => 'sidebar',
'allowSearch' => false,
'limit' => 4,
'orderBy' => "RAND()",
));


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/

Re: [Jason] Adding Individual Sidebar boxes/features

By csdesign - March 16, 2011

Thanks guys! I'll try that out!

Re: [csdesign] Adding Individual Sidebar boxes/features

By Jason - April 5, 2011

Hi Tina,

I'm not sure I understand where you're running into difficulty. You can pretty much use the same code to get your 2 random testimonials. Assuming that your tablename is testimonials, you could use something like this:

// load records
list($boxRecords, $boxMetaData) = getRecords(array(
'tableName' => 'testimonial',
'allowSearch' => false,
'limit' => 2,
'orderBy' => 'RAND()',
));


Exactly how we'd create your slideshow would depend a lot on which slideshow script your using. If you need us to integrate this in for you, that is something we could do through our consulting service. If you interested in looking into some options for that, please email consulting@interactivetools.com.

Hope this helps get you started. Please let me know if you have any other questions.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] Adding Individual Sidebar boxes/features

By csdesign - April 5, 2011

Hi Jason,

I'm sorry, I don't think I explained it very well. I think my confusion lies with having 6 "boxes" that I want to come up in the sidebar (3 of which are displayed randomly) and I wasn't sure how to go about setting it up since 4 are text only, one is pulling in testimonials and one is a slideshow gallery.

I'll go ahead and jump into it and see what I can accomplish. Thanks!! Tina

Re: [csdesign] Adding Individual Sidebar boxes/features

By csdesign - April 14, 2011

Hi Jason,

I have all 3 types of boxes created now:

slideshow box (1) = boxList3.php
random testimonials box (1) = boxList2.php
general text boxes (4) - boxList1.php

What I would like to achieve, but I'm not sure it's possible, is to have 3 of the 6 boxes display randomly in the sidebar. I was able to setup a random display for the 4 general text boxes, but since the slideshow and testimonials are setup in their own php files, I'm not sure how to get them ALL to work together.

Here's my working page for testing and the code used.

http://www.nwsc5872139.myutilitydomain.com/news.php

<?php include "boxList3.php"; ?>
<?php include "boxList2.php"; ?>
<?php include "boxList.php"; ?>

Is it possible to get the boxList3 and boxList2 to work with the boxList in the sidebar? (display max of 3 random boxes in the sidebar)

I hope that makes sense.

Thank you! Tina