Categories > TinyButStrong general >

Extending templates from subtemplates?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Daniel Tsviatkov
Date: 2011-04-19
Time: 12:21

Extending templates from subtemplates?

Is there any way that i can extend template from a subtemplate.
For example if i have an application of some kind, which supports plugins or addons.
And if i have <div> somewhere on the page for example
<div id="status_bar" class="status_bar">Some content here</div>
can i 'insert'
<div id="plugin_1">Other content here</div>
between the opening and closing div.
Or for example can i change it to something like
<div id="status_bar" class="status_bar_extended">Same old content here or with something new</div>
By: Skrol29
Date: 2011-04-19
Time: 23:39

Re: Extending templates from subtemplates?

You can do the fist one using a something like this:
<div id="status_bar" class="status_bar">
  <span>
  Some content here
  [onload;file=my_subtemplate.html;comm=span]
  </span>
</div>
Or more simply:
<div id="status_bar" class="status_bar">
  Some content here
  [onload;file=my_subtemplate.html;comm=div]
</div>
but in this case the sub-template must contains the new <div id="status_bar">