简体   繁体   中英

Drupal route based node content

I'm new to Drupal and have a basic question which I cannot find a good answer to. I am trying to dynamicly determine the contents of my website based on a selection made by the user and keep the selection displayed in the routing for SEO purposes.

It's a website for a Restaurant with multiple franchises.

What i'm trying to do is the following:

  1. The user visits my website and gets a splash screen presented with the available franchises or a textbox to enter his postalcode
  2. Upon selecting he enters the main website with the navigational structure adapted to the selected franchise. For example: domain.com/city/ , domain.com/city/menu , domain.com/city/menu/dishes , domain.com/city/contact , ...
  3. The contents of all nodes are based upon the city the user selected. Some franchises have extra nodes which should be displayed in the main navigation aswell.

What I have thought about so far is to try to accomplish this with taxonomy but I really have no idea where to start. Parts of the nodes will be the same for all franchises other parts will be different. Menu item prices will also be different.

This is the first website i'm building using Drupal so any advice is welcome.

Thanks!

It will be impossible to explain it all here but yes it is possible to select your content based on user input in Drupal. You will need to look into Views & Panels.

In Views you can use arguments to narrow to a specific taxonomy. With Panels, an argument can be retrieved fron the URL and passed to the Views in order to display the results.

There are a lot of resources available, Merlin of Chaos, the author of the Views & Panels modules has written a book about it. There are video tutorials online. Your best bet is to start with drupal.org.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM