Does anyone have any good advice for creating a content type for links? Does anyone know a better way to do this than what I describe in the following?
Our library has a huge page of links for finding good books to read. There are several headings that take you to different parts to the page via anchors. Anyhow, take a look at it. You'll get it as soon as you see it.
http://www.hooverlibrary.org/goodbooks
It's actually a legacy page that I have coped over to a Drupal page. It uses old and nasty html with tables and it's really yucky to update. I could clean it up but I would really like to create a content type called links, create a taxonomy scheme and then build a page with views listing the links. I'm not sure the best way to go about it though. A huge advantage would be that I could give staff access to the content type and they could help keep up with it.
Modules: CCK, Views, Contemplate
Any ideas?
Comments
CCK, the Link module,
CCK, the Link module, Taxonomy, and Views --
Views ships with a default Directory view -- you could use/modify that to create your directory. Use taxonomy to categorize the types of links. Use CCK and the Link module (http://drupal.org/project/link) to create the actual link nodes.
Cheers,
Bill
FunnyMonkey
Tools for Teachers
FunnyMonkey
Doing this for an A-Z E-journal page
It uses a CCK content type for a Journal which then used Views to present the page of Journal titles and links alphabetically arranged. However, Views makes it trivial to add a filter to filter the page for the type of Journal (or in your case the types of books you want to present).
I'm not sure how you would have the anchor links at the top of the view, but you could use Panels to present a node with links to the specific filtered set of books (e.g. a view link with an 'Thriller' filter appended) in the node below. Easiest though is to just use the search/filter options in Views to present the subset of books of interest. You can provide the full list of books sorted by taxonomy and then alphabetically in class as the initial view. Using the Views links with appended filters allows you to link from anywhere in your site to a specific set of recommended books (e.g. from the Juvenile section to the JA set of books).
Hope this makes sense.
Super Ideas
Both super Ideas. I'll take a crack at it on my test site and see what I can come up with. I could also create blocks of views for different sections of the website for certain categories. For example. I could have the Juvenile books also in a block in our Kids section of the website in addition to our Good Reads main section. Eventually I hope to post some results. Thanks!
I had to do something similar
Hi there,
I had to do something similar on an internal website (Drupal 6.6). We were wanting to list a series of Tourist Information websites, ordered by category and subcategory. Here's how I did it:
I'm a newbie, so I'm not sure I've described this very clearly. I'm also not sure that this was the best way to do accomplish the task, but it worked for me. Suggestions on how to streamline the process are welcome!
Cheers,
Virginia Franklyn
Pikes Peak Library District
how many views was this?
Hey Virginia,
Great tutorial. One question I have is from your comment in step 5:
Did you create one view for each category or one view that takes has an exposed filter and/or takes a TID as an argument?
--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book
knaddison blog | Morris Animal Foundation
too many, I'm sure
Hi greggles,
I created a separate View for each category (using the clone option). There were about 13 Views total and many more page/block displays. I would love to know how to create just one View that does the same thing via a filter or argument. I was trying to figure that out but ran out of time. Do you mind elaborating on how one would do that?
Thanks,
Virginia
Add the argument in the
Add the argument in the arguments section:
You can then call the view with the argument ala: mysite.com/myview/myargument
Your "myargument" would be a TID.
Cary
That worked!
Thanks Cary, that was a much more elegant solution than what I had orginally done.
However, am I right that I can't assign the page display to an existing menu in Views? Instead, I assigned them in Menus specifying the TID, not a big deal.
Also, I couldn't figure out how to assign the Blocks using the TID argument to specific pages. In other words, I made the block display in Views using the TID argument, but couldn't assign blocks with different TIDs to different pages. In this case, I just used the blocks I had created with specifically assigned subcategories.
When in doubt,
set menus (and URL aliases) in their native control pages. You have a lot more control at the cost of a bit of convenience.
As to multiple blocks using different arguments, well, there is a 5.x module called Views Argument API. but I haven't used it. Another option is panels where you can actually call a page by URL into a panels block.
Great advice
That's great advice that I will make into practice.
Panels sounds interesting, but I was under the impression it wasn't ready for Drupal 6.x yet, but I'll keep an eye on it. This website was pretty small, so I think the separate Block displays in Views will work fine in this case.
Thanks again for your help, Cary!
Just at that point
Thanks Virginia for spending the time to write a step by step guide of you experience. It's an excellent reference and brings us to the views aspect. The idea that you can link to different arguments (by modifying the address) in one single view could save me a lot of effort. I'm glad for greggles and Cary shedding a little light. I'm not a views guru by any stretch so I'm learning as I go. Views has a load of options and I was aware of arguments but it was a little unclear how to prepare the view correctly to take advantage.
This project, while seemingly straight forward has a snag. It's my fault.
Sometimes my "Link" content type doesn't have a link. The original html page also has popular book series. I made an additional content type for popular books. I put them both in the same Vocabulary "Link" so that I could still list them in the same view. The problem I am having is with the field display settings. I have chosen the "title as link" (part of the option in link field for CCK) while also choosing Node:title for the popular books title. This leads to a duplicate title entry for all of the links content types. I feel like I need a conditional statement. It could would be something like " If content type is link=false print the title ." I'm not sure though. I'm still messing around with it. Maybe I should build two views and put one in a block on the same page. I'm not sure.
In the meantime I have field listing is the Node:title separate from the word "link" that links to the website.
I've sorted the list in ascending and have grouped everything by taxonomy term. I'm pretty happy with that.
I'm not in the menu part yet.
See big versions of these:
http://www.hooverlibrary.org/files/drupal-head/link-CCK-form.gif
http://www.hooverlibrary.org/files/drupal-head/link-view-settings.gif
http://www.hooverlibrary.org/files/drupal-head/link-node.gif
I feel close to getting it right. If anyone has any more ideas please post em. Thanks for all the help.
Revised documentation
FYI, I've revised the documentation for creating a View w/argument to display a series of web links organized by category here:
http://virgiblog23.blogspot.com/2008/11/kiosk-resurrection.html
Good luck with your project!
Virginia
Hey Virginia, I must be an
Hey Virginia,
I must be an uber-n00b if you were a n00b when you wrote this. I did notice your blog is gone now. Any chance you have the revised documentation for this that you could post here?
Many thanks!
No worries, I did change the
No worries, I did change the URL. Here you go:
http://vfranklyn.blogspot.com/2008/11/kiosk-resurrection.html
Sorry for the confusion, and good luck!