Page 1 of 1

Padding of (sub)categories

Posted: Thu May 07, 2009 12:47 pm
by yellowled
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

Re: Padding of (sub)categories

Posted: Thu May 07, 2009 1:12 pm
by kleinerChemiker
If there is no possibility, I think Smarty can basic arithmetic operations.

Re: Padding of (sub)categories

Posted: Thu May 07, 2009 1:29 pm
by yellowled
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

Re: Padding of (sub)categories

Posted: Thu May 07, 2009 3:42 pm
by judebert
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.

Re: Padding of (sub)categories

Posted: Thu May 07, 2009 4:12 pm
by yellowled
No worries. I already assumed it was hardwired into the plugin :)

YL