Displaying list items by category
I have section of a site where my client can create categories, such as "Window Treatments" and "Painted Furniture". They can then go to a different section of CMSB and create a listing that goes into one of the categories they created. These categories appear in CMSB as a dropdown menu that is populated by using "Get options from database (advanced)".
I've produced a list page that shows all of the individual records, but I'd like there to be a page that lists all the categories. The items on the list would link to a listings page that only shows the items within the chosen category.
Here's the listing page I have now, which shows everything that has been input: http://kathiejordandesign.com.previewdns.com/store.php. However, I'd like this to appear first - http://kathiejordandesign.com.previewdns.com/storeCategories.php - and the items should link to a page that shows only the selected category. Here's what a typical details page looks like: http://kathiejordandesign.com.previewdns.com/storeDetails.php?Lady-of-Shalott-1.
Thanks, Greg. This works really well. http://kathiejordandesign.com.previewdns.com/storeCategories.php
Please can you tell me if it's possible to do the following, too. Not all of the categories shown on this page (http://kathiejordandesign.com.previewdns.com/storeCategories.php) have items added to them; e.g. Gurgle Pots & Guggle Jugs doesn't have any products yet (http://kathiejordandesign.com.previewdns.com/store.php?Gurgle-Pots-Guggle-Jugs-15). Is it possible to either hide any categories on the main index page if they don't have any items? If not, how about putting the number of items in brackets after the category's name in the list; e.g. Gurgle Pots & Guggle Jugs (0); Oil Paintings by Local Artists (2). Hiding the empty categories would be preferable.
What about adding a 'hidden' check box to the category section, and hiding categories that you havn't added items too yet?
If you create a checkbox called 'hidden' in the category section, the getRecords function will automatically not retrieve records with it checked.
If you wanted to add a counter for the number of records, you could implement the code from this post: http://www.interactivetools.com/forum/forum-posts.php?postNum=2229899#post2229899
Let me know if you have any questions.
PHP Programmer - interactivetools.com