Home | Products | Consulting | Hosting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Product of the Month box.

 

 


steve_e
User

Jun 26, 2008, 5:02 AM

Post #1 of 2 (179 views)
Shortcut
Product of the Month box. Can't Post

Hi -
Rather than produce a list page from which each record can be linked to, I would like to have a regularly changing record displayed in a box on a page as a 'product of the month'.

So for example, various fields in a new record will describe the product, have an image of it and provide links to the vendor's website. It will also have start and end dates (eg 1st to 31st July). A number of these may be set up in advance, but only the one for that particular month should show up as the 'current' item. Does that make sense? I'm not sure if that's really easy and I'm just not looking at the problem correctly, or if it's a more substantial challenge?

You can see the kind of thing in the box on the right hand side of this page:

http://www.foundation-stage.info/newfsf/articles/ReviewIndex.php

The content of the box is taken from a CMS builder section record, but I can't figure out how to set it up so that it changes at the end of every month. Hope that all makes sense!

Smile


Dave
Staff / Moderator


Jun 26, 2008, 10:59 AM

Post #2 of 2 (142 views)
Shortcut
Re: [steve_e] Product of the Month box. [In reply to] Can't Post

Hi Steve,

There's a few features you can put together to make this work.

You can automatically have records show and be hidden with the special fields 'publishDate' and 'removeDate'. Create date fields for those. You can read more about special fields here: http://www.interactivetools.com/docs/cmsbuilder/special_fieldnames.html

Once that's done, your list should only show records within the date range, but you only want to show one, so add this to your viewer code (in red):


Code
list($yourRecords, $yourDetails) = getRecords(array( 
'tableName' => 'yourTable',
'limit' => '1',
));


And that will only show the first result. So in the event that you do have more than one product setup for a date range it will just show one.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Hosting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4