MyBB Community Forums

Full Version: Creating a template and including it..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I made a template within my template set and called it header_sidebar to clean up my code. When I made it, it was put in the header section..
I then tried this in the header template:
{$sidebar} and {$header_sidebar}

and no luck Huh
Does anyone know how to include the template I made?
This should accomplish what you're trying to do:

http://mods.mybboard.net/view/global-templates
(2010-04-10, 01:54 AM)Scoutie44 Wrote: [ -> ]This should accomplish what you're trying to do:

http://mods.mybboard.net/view/global-templates
Hey thanks for that. Is there a reason why it doesn't work by default?
You have to call them using PHP, that's all I know. It might be included in a future version (2.0 if it's not in 1.6), maybe something like {$template['name']}. Dunno though.
Yeah, I asked about it here.

Yumi and I came to the conclusion that it's an easy interface to setup your template for a plugin.
I use Yumi's PHP in Templates / Complex Templates plugin to do that.

Call the template with a simple tag:

<template header_sidebar>