Hi everyone,

I am trying to do something that seems to me like such a simple task. Being relatively new to Drupal, this has proven to be a greater challenge than expected (after heavy Googling and Drupal searching).

In essence, I am basically looking for a way to modify a Frontpage view so that each Teaser node is either wrapped or has a blank div with a class containing the machine-name of the node's "Category"

Categories have been set up as a taxonomy type. I have been unable to limit the selection of a single category to a single node (I.e. categories are basically Articles, Videos, etc. to accommodate categorization of multiple Content Types to a single bucket). This is similar to a Wordpress taxonomy structure. Let me know if there's a better way of doing this too!

The envisioned result is to have a simple icon for each piece of content based on its assigned category on the front page.

I am hoping to use only Views to do this but when in Content mode, I can't access the "Categories" value of the node through the tpl. Would the only option be displaying via the Fields mode?

Anyone have suggestions? Any options are welcomed including DisplaySuite (which seems a bit overkill or what I'm still deeming as a simple task)

Thanks everyone in advance. The Drupal community has always been awesome and I do hope to resolve this with the simplest lightweight solution possible! :)

Comments

Bump?

Bump?

---

Fields within Views is going to be your best bet, as you'll most likely need to use "Global Custom Text" to wrap everything in a div, and show the icon (hopefully you named the icon the same as the taxonomy term so you'll have no trouble linking).

Essentially add in all the fields you want to show (title - linked to node or plain text, body - trimmed at X length with read more if you'd like, and the term) with all those fields "excluded from display". Then add in Global Custom text, which is where you'll display everything.

Your text will look something like this:

<div class="[category]">
<h1>[title]</h1>
<p>
[body]
</p>
</div>
nobody click here