2013-04-13, 06:29 PM
I am wondering how to insert large amounts of HTML into multiple templates.
For example, in the index template,
the header HTML is called up by using the snippet {$header}.
The same goes for other snippets such as {$footer}, {$forums}, and {$boardstats}.
All these {$} snippets contain the real HTML code that will then replace the snippet upon the page load.
How do I create snippets of my own? I'd like to place chunks of code on different templates without having to paste in the entire lengthy code, and use a snippet such as {$chatbox} or {$sidebar} instead.
As of right now, I have to edit all affected templates and replace stuff there. I'd like to just edit my HTML in one place instead. I'd just have to replace the chatbox template or the sidebar template and wherever {$chatbox} or {$sidebar} is called up, the changes will be automatically made.
I see plugins that create their own {$} snippet for the same reason. My question is.. is there a way to achieve this without the creation of a plugin?
For example, in the index template,
the header HTML is called up by using the snippet {$header}.
The same goes for other snippets such as {$footer}, {$forums}, and {$boardstats}.
All these {$} snippets contain the real HTML code that will then replace the snippet upon the page load.
How do I create snippets of my own? I'd like to place chunks of code on different templates without having to paste in the entire lengthy code, and use a snippet such as {$chatbox} or {$sidebar} instead.
As of right now, I have to edit all affected templates and replace stuff there. I'd like to just edit my HTML in one place instead. I'd just have to replace the chatbox template or the sidebar template and wherever {$chatbox} or {$sidebar} is called up, the changes will be automatically made.
I see plugins that create their own {$} snippet for the same reason. My question is.. is there a way to achieve this without the creation of a plugin?