Log in

View Full Version : How can I create template groups ?


mihai11
07-24-2007, 01:46 PM
Hi,

Please take a look at the attached image. As you can see, a style can contain templates & template groups.

Example of templates (from the attached image) are: "send_to_friend", "shell_blank", "spacer_close", "spacer_open", "TEST", "TEST2", "TEST3" etc.

Example of template groups are "Search templates", "Show groups templates", "Show thread templates", "Smilie popup templates", "Sunscribed threads templates" aso.

How can I define a group of templates ? I want to put all my templates in such a group. For example, I want to put "TEST", "TEST2", "TEST3" in a group called "TESTING".

Regards,
Razvan

Princeton
07-24-2007, 01:58 PM
you will need to create a plugin

HOOK LOCATION: template_groups
TEXT: $only['template_prefix'] = 'TITLE OF GROUP';

FYI
- your templates should all have the same prefix eg. mytemp_threadbit, MYTEMP_SHELL, etc, etc
- you must add new templates to the MASTER STYLE

mihai11
07-24-2007, 02:26 PM
you will need to create a plugin

HOOK LOCATION: template_groups
TEXT: $only['template_prefix'] = 'TITLE OF GROUP';


FYI
- your templates should all have the same prefix eg. mytemp_threadbit, MYTEMP_SHELL, etc, etc
- you must add new templates to the MASTER STYLE

This is not complicated, but I hate to create a plugin just for this functionality. (currently, plugins are disabled on my board because my board is "clean" - no plugins or hacks)

I am thinking to use a common prefix.

Kirk Y
07-24-2007, 06:07 PM
I'd hardly consider a board with plugins enabled "dirty". Properly used, Plugins are very efficient and safe.

squishi
09-05-2008, 07:54 AM
I tried to do this in 3.7.3 and it did not group the templates.

Okay, got it working. For future reference:
The prefix should not include the underscore.