Blog Display: Sorting Category from URL

3 posts by 2 authors in: Forums > CMS Builder
Last Post: December 31, 2008   (RSS)

By avrom - December 31, 2008

Hi Dave,

I'm sure this has been asked before ^^ and it is simple. I am creating a list viewer blogs.php then a detail viewer blog.php

There are various categories such as music, religion, politics, etc already defined in a pull-down list aptly called "category".

I know I can define which category to display from the detail page:

'where' => 'category="Music"',

SO how do I actually call that from the url on blog.php so I can sort the different categories from one detail viewer page ?

Thanx in advance,
Avrom :))

Re: [virgodesign] Blog Display: Sorting Category from URL

By Dave - December 31, 2008

Hi Avrom,

Do you want to display a display of categories or be able to filter blog results by category with the url? If it's the latter, drop the where and try this:
blogs.php?category=Music

This uses the built in search engine features described here:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html

If that's not it give me some more details (and urls if you can) and I'll try to help.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com