By widecast on
Hi,
I'm working on a city guide.
I want to be able to have an page named cityA.html
Then on that page have a general overview of the city, then on the same page below the overview to have a teaser of all the cities subtopics, such as hotels, things to do, etc.
That way the page would look like:
CityA
Overview
Teaser for topic1
Teaser for topic2
Is this a logical way to organize my city guide? If so, how can I go about setting that up?
Thanks a lot!
David
Comments
Views
Have you looked into using Views? Tag all relevant content with the city name, and then build a View that lists all nodes with the tag.
You want the city overview at top, of course. Two ways:
1) Put the city overview into the View's header. (Easy, but not too flexible, as the text won't be a node that can be repurposed elsewhere.)
2) Put the city overview into its own node, tagged with the city name. To make it appear at the top of the View, check the "sticky at top of lists" option.
Is that all a possible way to go?
--------
Easy Drupal Admin Manual, Drupal questions, other stuff for the newbie: http://www.drupalace.com
Hey there, I've considered
Hey there, I've considered both of these options actually, thanks for confirming that these are logical possibilities (as I'm new to Drupal, sometimes I think I may be going in the wrong direction).
I'll probably go with #1. A couple more questions:
1. Just to confirm, I'll probably need to create a new view for each individual city, correct?
2. Is it possible to have a menu w/all the city names and when a particular city is clicked, the menu would expand and show all the nodes for that city as well (same nodes that are listed as teasers on the page) created automatically, or should I just do it manually?
3. How can I output a list of links to all my city guides?
Can anyone else can answer
Can anyone else can answer these last questions? :)
Try to help . . .
Hi,
I'll try to help you with this, but I'm still a relative newbie myself and I've only just set about to really get stuck into views . . .
Anyway, I have a local site under construction at the moment, with a very similar architecture to the way you describe yours. You can do various things here:
views is a great module, and you can configure it to display the view as a 'page' and write up your city overview content in there (in the header). Below that you could decide on any number of ways of presenting the content depending on how you decide to set up the filters etc.
Yes, you'd need a different view per city, because otherwise the header text would be exactly the same. I guess you could insert php variables into your site (very easy to do) and call these to print the city details on the relevant page, but the general text would still look the same!
However, one thing you can do with views is to pass 'arguments' to the page, so only one view is needed regardless of how many cities you have. Passing the argument to the page view allows you to change the page title etc etc, without having to do this by hand countless times with separate views. We decided against this method because we wanted totally different text at the top of the page for each of the categories (note: As I said, I'm still learning and climbing the vertical Drupal ladder, so any experts out there please feel free to tell me I'm a complete idiot!)
What you could consider is using a module that we've found very useful indeed . . . taxonomy Intro
This allows you to set up a separate intro text for your taxonomy term on the categories page in admin. When a user clicks on your taxonomy term from a menu or a tag on one of the nodes you've created, they'll be taken to the page for that term, with the intro text at the top, and the relevant nodes listed below that
The pro's are that it's fairly quick and easy to set up (perfect for us, because we only have a few taxonomy terms) but the downside is that all your nodes will be listed as teasers in the default Drupal method . . . ie latest created node at the top
For us, this is fine, so all nice and dandy! No need for lot's of views etc
For you, that might not be the case, and you'll have to really experiment and decide which way to go. I think that's one of the great things about Drupal . . . it's a steep learning curve, but that's because this thing is just so powerful. I'd rather have it that way than be easy to learn but not able to do much!
Onto menus . . . with these, the habit I've got into is not allocating content to a menu as I create the node, but to create my menus as blocks separately, then simply point the menu to the right content item or taxonomy term using the url field in the menu page
I then allocate the menu's on the 'blocks' admin page, so they appear where I want them and on the pages I want them. One thing you really want to think about is ensuring that you enable the 'path' module in admin, so you can use seo friendly url's for your pages instead of the standard Drupal ones. You should also take a look at a module called Path Auto, as this module allows you to give your category pages an seo name too
Once you do this, you can create a taxonomy (category) called 'New York'. Then create nodes about hotels, parking, restaurants, cinemas, bars etc etc and tag these with your New York term. You can then use path auto to create the url 'new-york' or whatever for your category view page, and create a menu item to link to this term. When a user clicks it, they'll see www.domain.com/new-york with your taxonomy intro text for New York and a chronological list of the nodes you've created and tagged with 'New York' below it
Hope this helps, even if only a little bit!
Biggy