Tips on creating a huge page of links

mikeybusiness's picture

Only local images are allowed.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,

bonobo's picture

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

Doing this for an A-Z E-journal page

whayes's picture

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

mikeybusiness's picture

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

vfranklyn's picture

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:

  1. Created the categories and subcategories in Taxonomy
  2. Created a Content Type in CCK and attached the Taxonomy to it. Used the Link module to add a URL field to the Content Type.
  3. Populated the Content Type with the web links.
  4. Created a Menu called Tourist Information.
  5. Created a View for each category and added Page displays for the category and its corresponding subcategories and Block displays for each subcategory as well. Assigned the Page displays to the Tourist Information menu in Views. The Views were limited to the URL field content type and filtered for each specific Tourist Information Taxonomy term.
  6. Created a page for each category that contained only subcategories. Assigned those pages to the Tourist Information menu.
  7. Created a main page called Tourist Information.
  8. Assigned the Tourist Information menu to the content region of the Tourist Information main page in Blocks.
  9. Assigned the subcategory blocks created in Views to the content region of each category page in Blocks.
  10. Now if I navigate to the Tourist Information main page I have a list of the categories and subcategories. If I click on any link in that menu, I see either a page created in Views, or a page assigned with the blocks created in Views. The pages list out the corresponding URLs for the selected category.
  11. I also decided I wanted the Tourist Information menu to show up as Nav Bar on the subpages, so I used the Multiblock module to create a separate instance of the Tourist Information block and assigned it to the left sidebar region of those pages.

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?

greggles's picture

Hey Virginia,

Great tutorial. One question I have is from your comment in step 5:

Createdted a View for each category

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

too many, I'm sure

vfranklyn's picture

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

highermath's picture

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!

vfranklyn's picture

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,

highermath's picture

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

vfranklyn's picture

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

mikeybusiness's picture

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.
Only local images are allowed.
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

vfranklyn's picture

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.

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

murrdogg's picture

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

vfranklyn's picture

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!

Libraries

Group organizers

Group categories

Resources

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: