Hello!
So I want to create custom pages on my site through the template system. I don't want to use a plugin like page manager because I want to know how to create custom pages myself so I can incorperate them into themes.
I also want to know how to include custom templates in other templates. Is there an object I need to call?
Thanks for your consideration.
(2010-11-22, 04:24 PM)Yaldaram Wrote: [ -> ]To add custom pages in another page, you just have to use a Variable that is used to evaluate template.
What variable? If you could simplify this a bit for me that would be great.
For example, go to:
http://community.mybb.com/thread-6615.html
There you find this;
eval("\$rules = \"".$templates->get("rules")."\";");
This is the syntax used to "Evaluate" Templates. Now see the $rules variable, you can use this variable to show that page contents in your other pages, BUT have to globalize it first. For instance, if you are going to use this in your plugins, then you have to use this as;
global $mybb, $templates, $rules;
(2010-11-22, 07:54 PM)Yaldaram Wrote: [ -> ]For example, go to: http://community.mybb.com/thread-6615.html
There you find this;
eval("\$rules = \"".$templates->get("rules")."\";");
This is the syntax used to "Evaluate" Templates. Now see the $rules variable, you can use this variable to show that page contents in your other pages, BUT have to globalize it first. For instance, if you are going to use this in your plugins, then you have to use this as;
global $mybb, $templates, $rules;
Thanks!
If my theming does well, you might get a present.