MyBB Community Forums

Full Version: Add and use custom template?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I've always worked in default templates in all my skins, but I'm wondering: there is a way to use my custom templates built by Add Template without core edits or add-ons?

For example I create a template called my_template, and I want to invoke it in my header template, there is some expression to do it such as:

{$my_template}, {$mybb->template['my_template']}, ecc.?

If there is no solution, why there is a similar option?
Add this in your PHP page in which you want the custom template to appear:

eval("\$html = \"".$templates->get("custom_template")."\";"); 

Now add your own custom template with the same declared name in PHP.
Thank you for replying, I know how to add template editing .php file... I would know if there is an alternative way to add templates without edit any file.
I don't think thats possible. Maybe I'm wrong.
After some searching I found this:
http://mods.mybb.com/view/load-templates

I would expect (if this is not exactly what you are looking for), it's possible with a plugin, but check out that plugin or a core edit Smile
@effone. I don't think you are wrong... Sad

@Conor Calby. You are right, that plugin is not what I was searching for, but it seems very usefull. Thank you! Wink
Not a way unless you use hook at proper place.