MyBB Community Forums

Full Version: index global template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I made a global template called index but it doesn't seem to do anything. My normal index template is used instead.

How do I make it work?
If you want to edit the "index" template, you need to do that in the normal index template. Global templates should only be used for modifications/plugins which are applied to all the themes.

(Also you should try to name your global templates after names which aren't currently used, or else you will end up not being able to access them)
Hello everybody, I have a piece of HTML code that I would like to use in all my forum templates, but I don't want to add it on all the template sets, and if I need to edit it, I don't want to edit it in all the template sets.

Should I create a new global template to do this? I did this, but I don't know how to "call" the code from the other template sets. Like: {$global_template_name} ?

Or... what is the best way to do this?

Your quick help is really appreciated Smile
You can create a global template, and it'll work, as long as you don't override that template in one of your custom themes.

For example, if you have a custom index template in Theme 1, it'll override the custom index template in the Global templateset.
Oh, thank you so much, but how do I "call" the content of the custom global template from the other template sets?

I've tried {$custom_global_template_name} but it doesn't seem to show anything :/
You'll need PHP to call stuff from another template.
Consider making a plugin.