hi everybody!
i've created a custom template named "personal" and i've added it in the templates list of the main theme. but now... how to use it?
i thought all I need was adding something like
{$personal}
in those templates where i want to use that custom template... but it's not enough.
so, what shall i do to use that "personal" template in other templates?
thank you in advance for your answers
You shouldn't create that template inside the theme's template but in global templates part. Go to GLOBAL TEMPLATES and create a custom template there and name it, say, personal. And then in all your themes, when you'd use {$personal} it'd evaluate and display all the contents of personal template there.
uhm...
it doesn't work o.O
i've just done exactly what you said, but it's still not displayed anywhere
It works for me, probably you're doing something wrong. Say, where are you adding the personal template? and which variable are you displaying and in which templates?
i added it in the global template list. i simply wrote in it "hello" and named it personal. then i opened the header template of the main theme and added the string {$personal} at the end of it.
and... it doesn't work ._.
It shouldn't be an issue but though, try adding below code instead of just hello in your template and see if it appears:
<html>
<body>
Hello.
</body>
</html>
still nothing appears...
in the last few minutes, i've opened the global.php file and i saw that there is a "templatelist" variable around line 300. so i've added "personal" in that list, and then, around line 500, i've added a this string:
eval("\$personal = \"".$templates->get("personal")."\";");
i'm not sure of what i've done (
) but now it works!
have i done something wrong o that could be dangerous for the stability of my site...?
(2011-11-24, 09:06 AM)ranjani Wrote: [ -> ]may be better to use global templates plugin
that would be good if it worked :O
there's plenty of errors o.O
http://img811.imageshack.us/img811/5189/...ata2ae.png
^ hmm., it is clear that the
global templates plugin files are not installed correctly !!
I use it on almost all myBB forums where I need to add customized content ...
ahahaah...! you're right ^^
i'm stupid!
now it works.
thank you, to both of you.
uff... :|
how does that plugin works?
I choose a phpname and the name of the template... and then? where do I find it, after i've created it? how can i modify its content?