Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Including dynamic content (PHP) inside of default.master.tpl
simonw
New
Hi,
I'm using the latest 2.1 release with the Bootstrap theme (http://vanillaforums.org/addon/bootstrap-theme).
I notice there doesn't seem to be a template.master.php anymore - only the smarty .tpl version both inside of Vanilla and the template i am using.
I'd like to include a block of HTML in the header which comes from a central location for simple maintenance.
We achieve the same effect in Wordpress using a cURL request - caching this data - and simply echoing out the output inside of the template.
What is the best way to reproduce this inside of Vanilla?
Is there any documentation around creating custom smarty tags?
Thanks
Tagged:
0
Comments
Themes vary, my themes most are php what changed is the master for the default from php to tpl.
You can include html in the tpl there is no list per say of smarty tags, you just need to input smarty tags in the search bar to find the info. You can also look inside the library folder under vendors for the smarty plugin and related files.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
http://vanillaforums.org/discussion/comment/205775/#Comment_205775
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Hello, I had some things I needed to be included into static pages.. I guess it could be kinda hackish, but it works..
You can use the basic pages application and then see my comment, http://vanillaforums.org/discussion/comment/210773#Comment_210811
Hope this helps,
Chris
My suggestion would be building a module to accomplish what you want, then including it in your template with the {module name="ModuleName" param="value"} syntax.