Display HTML Taxonomy Terms as per selected vocabulary in a 4 cols x # of rows as required

Events happening in the community are now at Drupal community events on www.drupal.org.
E_Maverik's picture

I have an e-commerce site where i navigate to a product via 3 levels. The first level is on the navigation menu - 4 ~ 6 Catagories, the 2nd level are up to 25+ "pages" each a vocabulary with a table containing a number of HTML links as per the parent vocabulary.

When a specific link on the table of the vocabulary page is clicked, the product node is displayed.

After struggling with the theme "override" challenge - i coppied the taxonomy terms (links) from the specific vocabulary page, pasted into an excel spreadsheet, (one column with up to 112 rows), re arranged the terms into a 4 col by (up to) 28 rows block, coppied the block into the "body" of the vocabulary's page & formated the table and fornts. There are 6 Catogories with up to 25 vocabularies each, so i had to create over 100 of these pages - A mind numbing exercise... and if terms are added upgrading is a serious time consuming issue.

I need to be able to dynamically generate the table of terms on the vocabulary page - I think i have isolated what needs to be done.. and need some guidance to confirm or correct my approach.

Challenge:- DISPLAY TERMS OF THE SPECIFIC VOCABULARY's PAGE AS HTML LINKS IN A TABLE 4 COLS X (up to) 28 ROWS

The theme i am using is garland.

  • The selection of terms to be displayed is handled by the "term display" module - the PHP file is term_display.module
  • The CSS for the theme is style.css in the garland theme directory
  • The file node.tpl.php in the garland theme directory displays the taxonomy terms as defined by the term display module using a class as defined in the style.css (i think).

I think i need to write a php script in the vocabulary's body to generate a table and populate with the links (terms of the specific vocabulary).. is this the best place or do i need to modify the term_display.module??

Do i need to create a "style" or "class" for the table in the style.css file

If i then choose to disable the term display option in the Catagory/edit vocabulary section, the terms should still be available to be displayed in the node body (right?? i wouldn't want it to be displayed twice)
Is this the correct approach?

Can someone point me to an example that i can relate this to?

Thank you in advance.

Comments

How about using views?

remco75's picture

Have you looked at the views module to generate your tables? Ik think this would be a more drupal-eske approach, and easier to maintain.

In views you can add a relation to taxonomy term and such.

good luck,
remco

Thank you for your prompt

E_Maverik's picture

Thank you for your prompt reply remco75!

I remember a while back looking at the views module for this and was not able to get it to display a multi column table.

I am using it to display the list of vocabularies as a single column table... but was not able to take it down to the next level and display the terms of the vocabulary item - maybe i missed something.. or it's because i am on drupal 5.3 and the associated version of views module may be buggy.

I tried upgrading some of the modules but hit the "white screen of death". Eventually i will need to upgrade - may involve a "rebuild" but need to fix this basic issue .

Another key reason, was to get a tighter access to the "terms" so i can look to automate the generation of "meta tags" and meta descriptions from the list of vocabulary terms - Ideally would like to see Google pick up a unique URL based on :-
www.mysite.com/index.php?q=catagory/vocabulary/page_of_terms/term -

Upgrade ;-)

remco75's picture

It's been a while back, but I can remember view being somewhat limited in drupal 5.3 (this is the views 1 branch I believe).

I'm afraid I can't help you further in this case: I started using 6.0 as soon as I got the change. Views 2.0 will solve your problem (and more) , although it has a bit of a steep learning curve.

Regarding the "white screen of death": try giving php more memory (in php.ini). If possible 128. That should solve most of it.

Good luck!

Views 2.0 doesn't work with Drupal 5.3 :(

E_Maverik's picture

Looks like views 2.0 works with Drupal 6.0!!
I am running Drupal in a hosted environment - can't get access to the php.ini file
The environment is Windows NT, running mysql 5.0.45, Php 4.4.7, Microsoft IIS/6.0
Do you know if it is possible to upgrade from Drupal 5.3 to Drupal 6.0 in this environment?
Also running eCommerce 5.x.3.4

would views 5.8 work for me??

Thats correct

remco75's picture

With drupal 5.3 you're stuck with views 1.

Upgrading to drupal 6 should be possible but I strongly advice you to switch hosts:
aim for:
- php 5.2
- apache webserver
- php memory limit at least 64 mb
- Linux webserver

As most sites run on platforms like this it is the easiest platform to find info on ;-)

Migrating al your products will be a pain though.

What do you mean by views 5.8?

Views 5.8 is the latest for

E_Maverik's picture

Views 5.8 is the latest for Drupal 5.x -
Views 2 looks too hard at this stage -

My original question.. can you help?
in the "body" of the vocabulary page - i think i need php code to display "term links" of that vocabulary in a table
where do i put in the "class definition" - which css file
can you provide a simple example?

Regards...

Sorry, can't really help you

remco75's picture

Sorry, can't really help you there. Drupal 5 is to long a time ago

Hope there are some other peaple here who can help.

greetz
remco

e-Commerce Module

Group organizers

Group notifications

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

Hot content this week