Hello, Ive been using drupal a short time and have no php experience so please excuse the terminology I may use.
I've created a view in a grid style (would happily change to a list view or other if it makes life easier), which basically displays a thumbnailed image of each node in a specific content type.
What I would like to do is apply a unique class (ideally the node's title) to each item shown in the view, so that the client can easily identify each item. (The view is inserted into each node itself with the insert_view module, so that each node appears as an image with a thumbnail gallery, it would be good if the client could 'highlight' a specific thumbnail using css styling in each node)
I've found posts where a solution has been found to add a unique class to items by numbering each item (http://drupal.org/node/130288), but I would rather have a node title or id inserted into the class as whenever a new node is added and the thumbnail gallery updated, the relationships would change as the newest node/thumbnail would go take the first position in the view, bumping the other thumbnails down.
I really have no idea how to go about this, apologies if I've not explained this very well, I cant seem to find anyone else that has looked for the same solution?
Comments
...
I'm not sure exactly what you're looking for, but you can rewrite the output of any view's field.
1. Add node:title to your view's fields list and select to exclude it from display.
2. Select the thumbnail field so you see the configuration options, then select 'rewrite the output of this field'.
3. Use a pattern like this:
Where [title] is the token for your node title and [field-token] is the token for your thumbnail field. Then, in your css you can use div.node-title to style with.
Not sure that is what you're looking for though...
Poieo, that was exactly what
Poieo, that was exactly what I was looking for, and it worked perfectly!
Thanks so much for your expertise, I am continually amazed by the scope drupal has