Download & Extend

Theming Fields that share the same column (table format)

Project:Views
Version:6.x-2.6
Component:table style
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

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.

#2

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

#3

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

#4

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.

#5

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

#6

Status:active» fixed

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

#7

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

#8

Are this fields cck fields?

#9

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.

AttachmentSize
poduct_view_hack.png 49.2 KB

#10

Status:fixed» closed (fixed)

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