I apologize ahead of time if my terms aren't spot on (still fairly new to Drupal but catching on quickly).

Basically what I have is Acidfree setup with an added category/taxonomy called "Photo". Under this are two terms, "Location" and "Event". Under the location term I have one term called "Hawaii" and under event I have a term called "Vacation". Basically the idea is to add more terms under location and event in the future but this is just to test for now. So with 'Multiple select' enabled under this category/taxonomy, I can basically tag the images with the Hawaii and Vacation terms. So assuming I have multiple users that have their own photos uploaded with both these terms, I can view all the images with just the Hawaii term by going to http://localhost/taxonomy/term/9, just Vacation term by http://localhost/taxonomy/term/10, or both Hawaii and Vacation by http://localhost/taxonomy/term/9,10.

What I'm curious is if I can customize how things are displayed when viewing those pages. I know I can create a view and use filters, but it would be MUCH easier to be able to basically template the pages that are automatically generated by going to http://localhost/taxonomy/term/x.

Comments

ronklaren’s picture

You can use the taxonomy theme module for that.

You can assign a theme to every vocab/term you want, or, you can use th extended paths function to assign a theme to a particular path.

Eluzion’s picture

Hey ronklaren,

Thanks for the reply! I did look into the Taxonomy Theme module and gave it a shot, but the only thing I was able to do was assign an entire different theme. I'm guessing that might work if I just edited whichever file in the theme I have it pointed to, but would you happen to know which file that might be (or if I'm even on the right track here)?

Basically I just want to display the images in a grid style instead of stacked vertically on top of each other.

Eluzion’s picture

This helped me out a little bit: http://drupal.org/node/104316

Basically you can create a page-taxonomy.tpl.php file that all taxonomy "pages" will use. The problem is, I'm trying to edit how the data is being displayed on the page and in the tpl.php file, it simply has print $content;

I want that content that is being printed to be displayed in a grid view (like the views_bonus module has).

Eluzion’s picture

Hm, still no luck on this. I'm guessing this should technically be possible since I can do it with the Views_Bonus module for Views. Basically if anyone knows how the views_bonus applies itself to views, maybe I can input that same piece of code into the page-taxonomy.tpl.php page?

magoo’s picture

Depending on how your teasers are generated you may be in luck.

On my install, the "code" generated for each template is as follows:

<div class="node node-teaser node-type-YY" id="node-XX">
  <div class="node-inner">

YY being the content type machine-readable name and XX the node id.

If in page-taxonomy.tpl.php you add the same content than page.tpl.php and either:

  • add a class (e.g. "taxonomy") to the body tag and you will be able to create CSS rules in your theme's CSS file in order to create what you want;
    .taxonomy div.node-teaser {
      float: left;
      width: Xpx;
    }
    

    or,

  • add this directly in the page-taxonomy.tpl.php file inside <style> tags
    div.node-teaser {
      float: left;
      width: Xpx;
    }
    

X being [ (width available) / (amount of columns) ] - (some margin)

--
magoo

TC44’s picture

Excellent, thank you magoo. I had the same issue, and your solution worked perfectly.