Helpful Information
 
 
Category: vB5 Programming Discussions
Template Groups

i see that create Template groups has now changed in VB5 but when trying to create the group in the product .xml file i am confused

this is an example of the admin template group within vbulletin-styles.xml

<templategroup name="Admin">


but i wish to use the same method within a product.xml the problem is where to place it ?

below is part of the xml where it shows <templates></templates>


<dependencies>
</dependencies>
<codes>
</codes>
<templates>
</templates>
<stylevardfns>

i have tried many ways of try this

<templates>
<templategroup name="test">
<template name="test_1" templatetype="template" date="1345854416" username="simonhind" version="5.0.0 Beta 10"><![CDATA[testing content
]]></template>
</templates>

but it throws error when i import

if anyone can help on a simple example it would be great

Did you try the old vb4 plugin code?

Not possible currently.
There are not hooks/plugins in vB5.

You are confusing a style xml with a product xml.

The proper way to add a template to a product XML file is to put the forum in debug mode.

Go to Style Manager in the Admin CP, choose the master style, and from the drop down box choose "Add New Template"

On the next page give the template a name, choose your product from the drop down product list, and enter the code for your template.

Save.

Finally go to the Product Manager in Admin CP and "Export" the product- it will contain all your settings, templates, phrases, and anything else you can associate with the product from the Admin CP.

Bop5, he is asking how to make a template group not a template, am i wrong?

Bop5, he is asking how to make a template group not a template, am i wrong?

that is correct, woudl like to add a template group within the product

i have looked at vbulletin styles.xml which holds this
<templategroup name="Admin">

but the issue is where in the product xml should it be placed

the example from that is this



<templategroup name="Admin">
<template name="admin_screenlayout_1" templatetype="template" date="1345854416" username="vBulletin Solutions" version="5.0.0 Alpha 37"><![CDATA[<div id="canvas-layout-100" class="canvas-layout row-fluid {vb:raw displayClass}" layout-id="1">
<div class="canvas-layout-row no-columns clearfix">
<div class="canvas-widget-list section-2 span12"></div>
</div>
<div class="canvas-layout-row no-columns clearfix">
<div class="canvas-widget-list section-0 span12"></div>
</div>
<div class="canvas-layout-row no-columns clearfix">
<div class="canvas-widget-list section-3 span12"></div>
</div>
<input type="hidden" name="displaysections[0]" />
<input type="hidden" name="displaysections[2]" />
<input type="hidden" name="displaysections[3]" />
</div>]]></template>

You can not add a new template group in vBulletin 5.
That tag (templategroup) is used for styles which are different from products.

Bop5, he is asking how to make a template group not a template, am i wrong?

sorry. :o

There is a way to add template group, but it require edit a file..
For doing that with extensions we should wait till:
1. vB5 devs take your suggestion and add the templategroup to the xml
2. Api extensions fixed to work in the admincp










privacy (GDPR)