i have this question, it´s a thing i don´t understand since a long time.

i have a view using table format and i have 4 fields sharing the same column.
when i try to theme this view with css, all fields only get the style of the first field (or the mother field i selected).

is this ok?
how can i theme every field separately?

thanks

CommentFileSizeAuthor
#9 poduct_view_hack.png49.2 KBnodecode

Comments

dawehner’s picture

This really dependent which field tpl you are using.

I have a view called test4

views-view-field--test4.tpl.php

themes every field in the test4 view, but

views-view-field--test4--title.tpl.php

themes a individual file.

pedrorestu’s picture

mmm ok, i see
so i can't change it directly in the css doc ?

dawehner’s picture

I don't really get what you are trying to do.

What do you mean with

fields only get the style of the first field (or the mother field i selected

pedrorestu’s picture

i need a table with 2 columns, lets call it "left column" and "right column"
in the "left column" i have an image. no problem with that.
in the "right column" i want 4 fields: user name, node title, node subtitle and node body

in my css y use to write something like this:

.view-ViewName .views-field-name {font-size:10px;}
.view-ViewName .views-field-title {font-size:14px; font-weight:bold;}
.view-ViewName .views-field-field-subtitle-value {color:#555555}
.view-ViewName .views-field-body {font-size:10px;}

which works perfect for me when i use grid style, or when my fields are in different columns using Table style.

I hope you can understand what i want, thanks a lot for you help.

pedro.

nodecode’s picture

Pedro i'm trying to do the same thing, did you find a solution to theming individual fields which occupy the same column??

dawehner’s picture

Status: Active » Fixed

Theme the individual fields seperate and add the divs/spans you need

nodecode’s picture

Is there any way to theme the views output to include the labels of those fields too?

dawehner’s picture

Are this fields cck fields?

nodecode’s picture

StatusFileSize
new49.2 KB

yes, they are cck fields.

I basically have a views-generated list of products (i'm using Ubercart) with the node title as one of the columns. Under the node title i have some CCK fields which contain some of the product specifications and ideally i want them to appear below the title, but smaller font size and in a list form, similar to what you might see on newegg.com

I am currently hacking it a bit by putting the CCK fields in the same column as the title and using <br/>&nbsp;<b>&middot;</b> as the separator for the fields. The result is what you see in the attached picture. However i want to also include the field labels and style them like on newegg.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.