categories and sub-categories question

8 posts by 2 authors in: Forums > CMS Builder
Last Post: October 4, 2011   (RSS)

I have a menu system with categories and sub-categories. An example of what I have is a category of "kitchens" and sub-categories of cabinets, counter tops, etc.

My customer has entered a lot of data, and for each of the contractors he has selected the sub-categories for each.

However, what I'm missing is that I when I display a main category, I am expecting to see all of the contractors with sub-categories for that category. What I get is a listing only if the sub-category is selected from the menu.

If I go into the data and specifically select "kitchens" and then select "cabinets" for a contractor, then I get a listing for that contractor when either kitchens or cabinets is selected from the menu.

Is there a way to code the menu and/or listing page so that anything that is a sub-category of a main category automatically gets listed, or do I need to explicitly select the main category and the sub-category for each contractor record?

Thanks.

Re: [furcat] categories and sub-categories question

By Jason - September 29, 2011

Hi,

Are your contractors stored in a section different from your categories? So when you select a category/subcategory, you want to see all the contractors where on of those has been selected. Is that right?

Could you attach your current code so I could take a look at what you have so far? Also, if you could give me more information about how your sections are set up, we should be able to figure something out.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] categories and sub-categories question

By furcat - October 1, 2011

Yes, basically. My contractors are separate from the parent and sub categories. My customer has just been selecting sub-categories off of the list I have set up, and I would like to have any contractor in a sub-category show up if the parent category is selected from the menu, without having to explicitly select the parent. Is this possible without going back into the data and selecting the parent category for each one?

Is it possible to have you take a look at the code without posting it where it can be viewed on the forum?

Thank you.

Re: [furcat] categories and sub-categories question

By Jason - October 3, 2011

Hi,

Take a look at this post:


http://www.interactivetools.com/forum/gforum.cgi?post=90272#90272


Does this sound like what you want to accomplish?

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] categories and sub-categories question

By furcat - October 3, 2011

Well, that's sort of what I want to do. But, looking at someone else's code isn't doing it for me. So, is the only way to get an answer is to post code in the forum? Is there a way to send it via email? Do I have to buy support to get an answer?

Thanks

Re: [furcat] categories and sub-categories question

By Jason - October 4, 2011

Hi,

If your using a drop down list, you could use the :label pseudo field.

For example:
<?php echo $record['category:label'];?>

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] categories and sub-categories question

By furcat - October 4, 2011

That worked. Thank you!