By quiXand on
Hello everyone! I just started using Drupal, and I must say, its a really great cms. I have been searching around for any posts that might help me but I just can't seem to find it. Anyway, I am planning to upgrade this website using Drupal, and based on the existing site, I want to:
- Click on a section (eg Biz Progress) and a page will load with all links on that specific category
- Have an archive page that will post older articles
If this is kind of vague, please visit the site and click on a category... that is what I want to happen. And as much as possible, please give me step-by-step instructions... I am already confused with this :)
Comments
Suggestions, but no solutions
I think you need to look into the possibilities of menus and perhaps you find something useful in this thread: http://drupal.org/node/67829
And perhaps rethink how you set up the site with fixed widths, it looks a bit funny here and there in my FireFox with a minimum font size set...
I tried using menus, but
I tried using menus, but each time I create new stories and put them in their own category, it appears on the menu as well...
Eg:
* Biz Progress
- Story 1
- Story 2
What I would like is to have them listed on their own category but not under menus.
As with the layout, I am planning to redo the entire thing. It is just for the sake of reference that I posted the site here. Any ideas?
Lack experience
quiXand,
I lack a bit experience in this, but I do have an idea. You have a frontpage with 2 columns: main content and a navigation list. That navigation part looks to me as if it's just block with links to pages (which is perhaps easier than a menu). Limiting the visibility of that block to the frontpage might get you the desired behaviour.
ok...
Thanks Caesar... I dpn't have experience at all when it comes to Drupal, so any kind of help is of course welcome.
So if I just make the navigation part links to pages as you suggested, how will I be able to dynamically include the links to new content for each of their corresponding pages? Please bear with me as I really don't have a clue. I've been trying to figure this out on my own, but all that I got was a headache :)
Uhm...
The links you're talking about would be links to 'page'- or 'story'-nodes, I guess. It seems to me you'd categorize each node and each page holds a list of links to nodes per category. The top of the frontpage has the most recent links based on date and further you have the 3 most recent entries per category displayed lower on the frontpage and standing apart on each categorized page. That's sql selected on node-type, date and vid (vocabulary ID).
Check out the snippets http://drupal.org/handbook/customization or have a look if a module already exists that can do this http://drupal.org/project/Modules.
I just so hope that if nobody else jumps in it's an indication we're on the right track ;)
Yes... I think
Links to pages that have links to stories... yes, that's what I want to have. It doesn't even have to have teasers for any of the stories. What matters is that when someone clicks on lets say Entertainment Success, they see the page where all stories under that category will be listed dynamically.
I will check out the links you mentioned earlier. But if you already have the idea on how to do this, I hope you can help me some more. Thanks!
Wait...
I just figured part of it out... I linked the menu item to the node that displays the category. One thing though, I can't seem to have it display just the links to the stories... it always shows some teaser text, and I don't want that. Do you have any suggestions?
The node or Views
I don't know "the node that displays the category".
I'm busy with something different but related. It seems to me you can query the node table for node.title and node.nid where vid = of the desired category, order by date. You can walk through the result set with a foreach or so and print the titles as links. Example (not tested/guaranteed to work :-p)
This can be placed in a node like 'page', set the input type to php.
BUT wouldn't the Views module not be really helpful? Seems to me it'd be worth it to check Views out.
Views
Until you mentioned it, I have not really heard of this "Views" before since I mentioned earlier that I am pretty new (and very very ignorant), on everything that is drupal.
I checked out the code you sent to me. At first it only displayed 1 link to 1 story... I tired removing 1 of the conditions, but it displays other stories that should be on another page... also, it would really be great if I could have the results displayed newest one firts. What should I do?
If I were to use this views thing, how should I go about it? I am really sorry about all this, but I really appreciate your help.
Well...
I'll answer this in case you need to play around with your data.
The sql string probably is quite close to what you need, adding "DESC" (descending) to the end of the query would've given you newest first. The vid_type and node_type variables were only examples; those should be changed according to what you've set up. There's plenty more you can do with sql, although it might be performance heavy and if it can be avoided by using existing code then that's probably an easier solution.
A great hint is to add, for development purpose only,
at the end of your node. It gives you all the data in that node, which is great for debugging or theming.
Got it
Forget my previous query... I went with your suggestion and used views. Although it took a while, I was able to achieve what I was aiming for. Thanks so muh for your help and patience. I hope when I get to know more about drupal, I can help others as well. Thanks again!
That's great!
I love happy endings ;-)
I'm sure you'll run into more trouble, that goes with the job, but you've seen enough already to know that you're probably not the first person with a specific problem and there's a great chance the answer can be found *somewhere* in the handbook or forum. Feel free to ask and when you can help out, it'll be greatly appreciated.
Good luck!