close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Is it possible to have 3 levels?

Thread began 7/22/2010 8:08 pm by info410500 | Last modified 7/29/2010 1:12 pm by Eric Mittman | 862 views | 10 replies |

info410500

Is it possible to have 3 levels?

Okay so I have a problem.. I have level 1 which shows all my products

Product1

Product 2

Product 3

Each product then has it's own sub category after that I then want to have another sub category but they seem to show up under every 1st sub category

visit ScourPads

under the Products menu thats where the problem is

I have 3 tables setup, products, category and then subCategory
on the subCategory table I have SID, PID, CID which are SubCategoryID, ProductID and CategoryID but I cant seem to get the 3rd Menu to Show under 1 Product it starts to show subCategory information under every Product. Any code that can help fix this?

Sign in to reply to this post

Eric Mittman

You can definitely have three levels of the menu in place. How do your level three items relate to the level two items? If your products relate to the sub category through an id field this should tie all of them together.

When you are adding the third level you need to specify the id column and choose to filter on the parent id and choose nested, so long as the filtered column you have selected matches the id of the previous level menu this should get you displaying the items.

We have a guide on this that can be found in the CSS Menu Writer support page:

mw2_creating_dynamic_menus_ht.pdf

Sign in to reply to this post

info410500

I have 3 Tables

Okay so 3 Tables exist in my database

Category
Products
Sub Category

Category:
CID | Name

Products:
PID | CID | Name

Sub Category:
SID | PID | CID | Name | Description | Image

The Sub Category table is the issue
that's where the link has to be the link works perfect. The Sub Category or 3rd Level seems to show up under every product.

The key column is the SID but how should I filter it? by PID or CID Cause when I filter by either it doesnt seem to work correctly it either wont show up or shows up under every Product like I said. Really ball breaking lol but this week I have to complete it.

Thanks
Luke

Sign in to reply to this post

Eric Mittman

To make the level three menu work you must select the column in that table that holds the id from the previous table then select nested for the filtering. This will automatically filter out the third level menu items so that they relate to the id from the level two menu.

The normal relationship of information like this would be:

Category
Sub Category
Products

The table that you use in the level three menu must relate to the table used in the level two menu. You must select the id for the third table that corresponds to the id from the second table. Your tables data must fit the one to many model as it goes down.

Each record in the first table should relate to multiple records in the second table. Each record in the second table should relate to multiple records in the third table. If your data does not look like this then it will be difficult for you to have the menus setup like you have described. Please explain how these tables and records relate to each other with examples if you have any further trouble with this.

Sign in to reply to this post

info410500

Database Relationships

AHh okay I understand how you mean.

The way the tables relate initially is by the CID then the PID For the sub categories like I said I have SID | PID | CID

The PID and the CID Relate to the correct fields and the SID is a unique auto_incremented number

Say for instance I have
1 | CategoryName in the Category Table
1 | 1 | ProductName Product Table
1 | 1 | 1 | SubCategoryName in the SubCategory table

The relationship is really by the CID and PID

Is that correct or wrong?

Sign in to reply to this post

Eric Mittman

The relationship of the records in these tables must follow the one to many model that I outlined. So long as you have 1 category id that matches multiple products, then each product has multiple sub categories associated with it then your setup should work for you.

If you do not have multiple sub categories for each item then this will not work correctly. When you are going down the levels of menus each new level must have multiple entries that match it to the previous level. Do you have records like this in your tables?

Based on how you are describing your db and relationships I'm not sure if you will be able to create the menu you are looking for because I'm not sure if your setup follows along with the one to many relationship between these tables. If you have any further trouble with this please post back with a copy of the db in a .sql format in a zip archive so that I can take a look.

Sign in to reply to this post

info410500

Okay

Yeah maybe you can fix it for me and post it back. Would much appreciate it.. been a big hassle with my knowledge here thanks

Luke

Attached Files
ScourPads.sql.zip
Sign in to reply to this post

Eric Mittman

I was able to make the three levels of menu with your data without issue. What I did was setup the dynamic link for the categories table with no filtering. Next I setup the products as a sub menu of the categories. I specified to filter on the cid column, nested. Next I added the sub category sub menu to the products. I choose to filter on the pid, nested. This gives me a three level menu that lists all of the categories, then each product for that category, then each sub category for that product. In my testing I found that you had many categories but only the abrasives category has any products, and out of those products only abrasive belts had sub categories under them.

I'm including screen shots of what the interfaces look like for the contents of this menu so that you have a visual reference to go along with the description.

Sign in to reply to this post

info410500

There We Go!

I knew it was something simple like that. Thanks again seems to work perfectly now :)

Sign in to reply to this post

biz295654

Extremely helpful discussion and screenshots. Thank you!

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...