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

Home: Products: CMS Builder:
Controlling the detailPages

 

 


Perchpole
User

May 22, 2008, 4:11 PM

Post #1 of 4 (179 views)
Shortcut
Controlling the detailPages Can't Post

Hello, All -

I've just started constructing my 2nd CMS Builder site. This portal, like the first, is another shop. Instead of dividing the product catalogue into series of physical categories, however, I've opted to follow Dave's advice and created just one main "catalogue" category. All of the products are then presented via various listPages by means of the $options['where'] condition - which is a rather elegant method.

There's only one thing more I'd like to do...

Each listPage has it's own specified detailPage. The boats, for example, are presented on a special marine-style template. That's fine when you're working with a single category - but what happens when everything is bunched together. If I choose to present all of the products on a single "catalogue" listPage (like a giant price list), how can I force each product to open in the detailPage associated with their category?

:o.

Perch


Dave
Staff / Moderator


May 22, 2008, 5:27 PM

Post #2 of 4 (177 views)
Shortcut
Re: [Perchpole] Controlling the detailPages [In reply to] Can't Post

Hi Perch,

Second site, way to go! :)

There's a few ways to have different products link to different pages. One way would be to use a naming convention for your viewers. So say you have a variable called $record['categoryName'] you could name your detail viewer /categoryNameDetail.php and then setup a link like this:

<a href="<?php echo $record['categoryName']; ?>Detail.php?<?php echo $record['num']; ?>">View Product</a>

So then if the category was called "widgets" you'd get a link like this: widgetsDetail.php?123

But if your category was called "sprockets" you'd get: sprocketsDetail.php?456

So that's one way, do you think that would work for you? If not we can come up with something else. Let me know if you need more details.

Dave Edis - Senior Developer
interactivetools.com


Perchpole
User

May 24, 2008, 6:33 PM

Post #3 of 4 (151 views)
Shortcut
Re: [Dave] Controlling the detailPages [In reply to] Can't Post

Hi, Dave -

This method seems to work rather well. In fact, the only place it doesn't work is on the Multisearch results page.

Care to have a fiddle?

:o)

Perchpole


Dave
Staff / Moderator


May 26, 2008, 9:25 AM

Post #4 of 4 (125 views)
Shortcut
Re: [Perchpole] Controlling the detailPages [In reply to] Can't Post

Hmm, multisearch wasn't build to support that.

I could either add an additional option that let you pass along an extra field from each table (we could call that 'extraField1') which you could use to pass along categoryName and create the link based on that.

Or... or you could create a viewer "categoryDetail.php" that did nothing but load the record and then redirect to the right viewer.

What do you think? Would either of those options work for you?

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