By Eshilon Design Inc on
I am building a restaurant website. The restaurant has two locations, each with its own menu, content, wine lists, etc.
So I've decided to build a "Location" taxonomy so that for pages and other content types, the client is asked to select a location.
I use theme_menu_tree() to print menus. But because each location has its own (largely identical -- really just different URLs) menu, I am currently checking the $_GET to see which term is in the URL, and based on that, printing the correct menu.
I feel like there's a more elegant solution for this situation. Any advice or thoughts?
Comments
How are the different
How are the different restaurants handled in the url? subdomains? subdirectories?
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
URLs
Thanks for replying. So I use pathauto to print the term-raw... so /location1/about-us or /location2/about-us
And if they hit the homepage or /node, they're forced to select a location.
You can set up different
You can set up different menus (admin/build/menu) for each location which will create different blocks for each menu. You can then set block visibility for menu1 to "Show on only the listed pages" and put the following in the textarea:
Then do the same for menu2.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
Hi, Good thing would
Hi,
Good thing would enhancing, finishing the place module for your purpose.
www.drupal.org/project/place
greetings,
Martijn