Padding of (sub)categories

Creating and modifying plugins.
Post Reply
User avatar
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Padding of (sub)categories

Post by yellowled » Thu May 07, 2009 12:47 pm

The categories sidebar plugin uses a variable called $plugin_category.paddingPx (in plugin_categories.tpl) to indent child categories. Seems like this is a base value multiplicated by the level of indention or something.

Is there any (sensible, i.e. w/out hacking the plugin) way to edit the base value for this?

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Padding of (sub)categories

Post by kleinerChemiker » Thu May 07, 2009 1:12 pm

If there is no possibility, I think Smarty can basic arithmetic operations.

User avatar
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Padding of (sub)categories

Post by yellowled » Thu May 07, 2009 1:29 pm

Sure. I could also tweak the plugin_categories.tpl for this particular project, especially since it's already being used anyway. I just thought I'd ask (Actually, I was told to ask :wink:) :)

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: Padding of (sub)categories

Post by judebert » Thu May 07, 2009 3:42 pm

It's very hardcoded to the category's depth * 6. It's an internal plugin, so the only way to change the value is to modify the core.

The depth is calculated during the serendipity_walkRecursive function, so it's not even something we could do a neat database trick to. The best you can do is modify the template.

Sorry.
Judebert
---
Website | Wishlist | PayPal

User avatar
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Padding of (sub)categories

Post by yellowled » Thu May 07, 2009 4:12 pm

No worries. I already assumed it was hardwired into the plugin :)

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

Post Reply