Page 1 of 1

Needed: A way to organize template options into groups

Posted: Thu Dec 04, 2008 4:34 pm
by Don Chambers
s9y took a huge leap forward with the ability to create template options, and bulletproof pushed that ability fairly well...

But even bulletproof is at a point where it might be helpful to take various options and group them in some way.

We have 'type' => 'content' which lets us get a message on the page, but what I am thinking is something more like the js solution used for general configuration. Blocks that can be hidden/expanded individually, or "toggle expand all".

Tabbing would be cool too, but I figure the other js is already present in the backend, so why not just re-use that.

So, is this possible? It would be a great addition to 1.4 IMHO.

Re: Needed: A way to organize template options into groups

Posted: Thu Dec 04, 2008 4:51 pm
by yellowled
Don Chambers wrote:Tabbing would be cool too, but I figure the other js is already present in the backend, so why not just re-use that.

So, is this possible? It would be a great addition to 1.4 IMHO.
I'm not sure we can do this for 1.4, but I completely second this.

It's not only BP. I, for example, have done a non-public commercial template which uses lots of theme options to select images from the media database. I you have something like that in the theme options, it get's really messy.

YL

Re: Needed: A way to organize template options into groups

Posted: Thu Dec 04, 2008 6:13 pm
by garvinhicking
Hi!

I also second that and put it on http://www.s9y.org/238.html.

There's no way it will be in 1.4, though. I will be releasing 1.4 before christmas, and I will have no time coding on new features before that. Plus, if someone else did that, it should have a longer beta-testing period.

Regards,
Garvin

Posted: Thu Dec 04, 2008 8:42 pm
by judebert
You can do a quick-and-dirty tabbing system using the existing "content" type. I did it for the Karma plugin.

For template options, you'd add another array entry, something like:

Code: Select all

$template_options['appearance_tab'] = array( 
    'type' => 'content',
    'default' => '
<!-- Only add this to the second and so on sections: ends the previous section -->
    <input class="serendipityPrettyButton input_button" type="submit" value="Save" name="SAVECONF" />
</div>
<!-- Start the new section -->
<div class="serendipity_template_appearancetab" style="text-align: center;"><a name="template_appearance"></a>
<span style="font-size: 10pt; font-weight: bold;">Appearance</span>
<hr style="width: 80%" />
');
Of course, you may need to change the HTML a little to match up with template options (right now, it's set up for admin options). But you get the idea: insert the HTML you need to define and end sections wherever you want it.