By ggarry on
Hi, I am using drupal for a travel site, now for each town I have a list of buses that go through that town i.e 22,51,124,300 etc for each one I want to turn it into a link that goes to a page like /bus/22 etc and on each of those pages I want a list of the towns that that particular bus goes through. I could make my own php page and do it that way but am wondering if views could do this? Any tips?
Comments
Yes
That is a good match for what views can do.
Basically you'll want to create a view that lists buses based on busID. Then you create a page located at /bus that takes whatever number is after /bus/ and loads the appropriate view (IE /bus/57 would load all towns for bus 57).
You should be able to read through the Views examples to get this working.
Thanks BradleyT, I can get
Thanks BradleyT, I can get it to work manually with views i.e URL= bus/43 and adding a filter where bus field contains 43 but can't work out how to do this automatically. I haven't found a views example that deals with this either.