close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

two dynamic menus

Thread began 2/23/2010 11:36 am by office377308 | Last modified 2/25/2010 5:34 pm by Dani Chankhour | 803 views | 5 replies |

office377308

two dynamic menus

After having setup the design part of CSS Menu Writer I ask myself how I would manage a 2 level dynamic category menu.
Which model would you suggest?
I usually have a database table structure like shown in screenshot177.jpg
It works with a combination of categories_id and parent_id
If parent_id = 0 it is the main category
if the parent_id <> 0 it shows to which main category (categories_id) it belongs.

Is there a way to fill this into dynamic menus or would you suggest another structure?

Any hint most welcome!

Sign in to reply to this post

office377308

well I know of [nested]

but it does not work for me because the first menu needs
1) a sorter
2) parent_id = 0

can you please lead me in the right direction?

Sign in to reply to this post

office377308

Seems this is one of the solo talks ...

I figured out the menu.php file in the cssmw subdirectory and entered all necessary code there. It works but with each little change it resets the file to its unsufficient defaults!

How can one get the Filter in the "Filter and sort (optional)" menu working if you need 2 or more criteria?
I need a languageID ("1" for English, "2" for Spanish ...) AND a value for the Main Menu: (parent_id = 0)
The nesting is working but again falls short for the language option.

How would you suggest to solve this?

Sign in to reply to this post

Dani Chankhour

I think you will need to add some custom code to the menu.php to get the other filtering working. In your menu.php, you should have two record sets, open the second record sets which you already probably modified to get the sub categories working, and then add another custom filter to it, so your final query would probably look something like this:

SELECT categories_name, categories_id, languageID, sort_order FROM menu WHERE categories_id=%s AND languageID = 1 ORDER BY sort_order ASC

Let me know if you have any other questions.

Sign in to reply to this post

office377308

thank you for responding

actually I had to fiddle a bit more because the langauge id is not static but will also receive its value by $_GET[]:

mysql_select_db($database_mydatabase, $mydatabase);
$query_menuwriter_categories1 = sprintf("SELECT language_id, categories_id,
categories_name, parent_id, sorter FROM categories WHERE parent_id=%s
AND language_id=%s ORDER BY sorter ASC",
GetSQLValueString($MenuWriter_menuwriter_categories1, "int"),
GetSQLValueString($language_menuwriter_categories1, "int"));
$menuwriter_categories1 = mysql_query($query_menuwriter_categories1, $mydatabase) or die(mysql_error());
$row_menuwriter_categories1 = mysql_fetch_assoc($menuwriter_categories1);
$totalRows_menuwriter_categories1 = mysql_num_rows($menuwriter_categories1);

I'd like to suggest to update CssMW in order to be able to do this from the menu...

Don't know why there is a space in the code further up at "$query_menuwriter_categories1"

Sign in to reply to this post

Dani Chankhour

Thanks for responding back, since it will help other uses who are trying to achieve the same result. I will bring this issue to our engineers and see if it is something we can add to Menu Writer.

Thanks.

Sign in to reply to this post

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...