Help separating products list

7 posts by 2 authors in: Forums > CMS Builder
Last Post: April 6, 2008   (RSS)

By _kate_ - April 5, 2008

First of all I have only briefly used this product but it's absolutely amazing!

I am trying to integrate this into an existing website for a client who wants the layout to remain the same. They have a list of products (Tables) broken into different table categories. The page layout is very basic (they have a new table for each different category with a heading for each).

I worked out how to make the products page and put it into the layout, however I need only products of a certain type to display within a table of its own without being joined to the others - so I made a list field called "table_type" and put all the different types in.

I figured out I could bring up only the items I wanted by using the following URL:
http://www.mywebsite.com/tablesList.php?table_type=Trestle

however I still can't figure out how to get the code on tablesList.php to display only the table type I want so I can put it into the correct spot on the page and paste in each table type. I basically need it to display a list of the products, however only display the table type that I specify. All the different table types will be on the one page.

Hopefully that make sense :) Any help is appreciated!

Re: [Dave] Help separating products list

By _kate_ - April 6, 2008

Yes! That's exactly what I needed - thanks! It's working perfectly now... :)

Just one more quick question... I used the "orderBy" thingy to sort the tables by their dimensions so it's currently showing them from smallest to largest e.g. 1 through to 9. Is there anyway to get it to sort with this field but display them in the other order (e.g. from 9 through to 1)?

Re: [AgentBristow] Help separating products list

By Dave - April 6, 2008

Yes, just add DESC (for descending) after the fieldname like this:

yourFieldName DESC

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

Re: [Dave] Help separating products list

By _kate_ - April 6, 2008

Cool, thanks! :)

I guess I spoke too soon. I'm having some issues with the page now. It was all working fine at first, but now after I have added more records there are problems.

For example in the first section their are 7 items which were displaying fine, but after I added the rest of the products these no longer show - however what is weird is that some of the items in the other category are showing but not all. All of them in some cats are showing.

Also, I just added the DESC to the sort and now 3 items in the first cat are displaying but not the others...

Re: [AgentBristow] Help separating products list

By Dave - April 6, 2008

My first guess would be that it's only showing the first page of 10. Try setting the perPage option to a high value, such as 999999

$options['perPage'] = '999999';

Since you don't want to page through these results with prev/next links we want to show more than 10 per page.

Let me know if that fixes it.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Help separating products list

By _kate_ - April 6, 2008

That was it! Thanks heaps for all your help! :)