How to Edit Category Tree?

46 views
Skip to first unread message

easypie

unread,
Jun 29, 2012, 5:37:59 PM6/29/12
to satchm...@googlegroups.com
What's going on is I have a dozen link and sub links under {% block sidebar-categories %} that I want to style using CSS. I want to give a unique background image to the first and last tag in category_tree. For example, if forloop.first then first ul tag will get menu_top.png and menu_bottom.png for forloop.last. But how do I figure out how to do that?

I skimmed through satchmo_category.py and other files but still confused. Something like this: http://i48.tinypic.com/v8g5ty.png

easypie

unread,
Jun 29, 2012, 9:16:54 PM6/29/12
to satchm...@googlegroups.com
I meant the first li tag and last li tag.

Darren Hollenbeck

unread,
Jul 4, 2012, 5:06:13 PM7/4/12
to satchm...@googlegroups.com
This is really more a django template / basic css question, but what you can do is test for forloop.first and last, and in those cases change your <li> to include a class="first" or class="last"

Then style the <li> first and last appropriately in css.
Reply all
Reply to author
Forward
0 new messages