List specific records first?

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

By Mowbray - March 25, 2008

Hello again,
I've come across another difficulty that my juicy brain can't seem to solve, although I'm hoping there's an easy fix.
It's probably just some little PHP thing.

The site I'm working on has a bunch of different brands in a sort of product catalogue. The client has a deal worked out with two of the different brands and wants to list their products first. Unfortunately it's not something that changing the alphabetical order could fix.
The brands are all listed under "$record['manufacturer']" and I know I can search for them using "productList.php?manufacturer=Example" However I want it so that when productList.php is loaded it shows "Lamp" brand items first then goes on to do "apple", "bench", "charlie" etc.

I'm hoping it's something easy with $options['orderBy']

Any ideas?

Re: [Mowbray] List specific records first?

By Dave - March 25, 2008

Hi mowbray,

If it's all in one editor you could add a checkbox field for "featured" and then check the brands that should be listed first and set the orderBy to "featured DESC, manufacturer".

Would that work? If not I have some other ideas, I think that one would be simplest, though.

Let me know. :)
Dave Edis - Senior Developer
interactivetools.com