By WillieBHines on
taxonomy/term is amazing! Very very powerful.
What's the best way to get it to list in zebra stripes? The contemplate module is letting me format the teaser views of all my CCK modules beautifully, but I can't find a way to get the taxonomy/term view to be striped.
I read the Views themeing documentation, and for the teaser view themes, it tells you to theme the teaser version in the node-TYPE.tpl.php file. Contemplate has taken care of that for me -- but I can't see a way to set "even" or "odd" as the view is generated so I can CSS some striping in there.
Comments
Here is one way
You will currently have a file node.tpl.php and/or node-type.tpl.php files that look something like
Which can be changed like this
Now you can use css rules like
Note that will you code add
$zebrato the div that surrounds the complete node (and includes the class node) you could not then tell the even/odd was part of a node.Where to switch "odd" and "even"
But where can I put some code to switch $zebra from 'even' to 'odd' and back? That's the trick I can't figure. For a TEASER view, I'm not able to create a theming function -- right?
$zebra should already be set
$zebra should already be set in node.tpl.php (there is already code in the phptemplate engine to do this). Also node.tpl.php covers both the teaser and full view.
Whoa!
I didn't know that! $zebra is set! Cool! Thank you!
I still don't get it!!!!!
Please help! I tried the steps above and I still am not getting anywhere! I have changed the node.tpl.php as nevets suggested; however, I am very unfamiliar with .css rules, so I think that is where I am getting stuck. Any help is GREATLY appreciated! Thanks!
Is there a reason $zebra
Is there a reason $zebra (or, rather, $vars['stripe'] from template.php snippet generated by Views theme wizard) is not applied directly to the containing li (and by default, to be used in css if needed and ignored if not)? It would save having to wrap one more div in the node or views-list-xxx_list.tpl.php, wouldn't it?
--
http://drupaltees.com
80s themed Drupal T-Shirts
mate, wheres
mate, wheres taxonomy-term.tpl.php ? lol...
Missing "print"
It should be
print $zebra;Shane
BWCA
wow!! +1 at how very useful
wow!! +1 at how very useful $zebra is for interesting layouts!
- Connecting Language Learners
www.huitalk.com
--
Neil Cameron