Padding of (sub)categories

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

Padding of (sub)categories

Post 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
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Padding of (sub)categories

Post by kleinerChemiker »

If there is no possibility, I think Smarty can basic arithmetic operations.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Padding of (sub)categories

Post 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
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: Padding of (sub)categories

Post 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.
Judebert
---
Website | Wishlist | PayPal
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Padding of (sub)categories

Post by yellowled »

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

YL
Post Reply