Announcement

Collapse
No announcement yet.

Embed Template in Template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] Embed Template in Template

    Hello,

    Is there a way to create a template and use it inside of another template?

    For example, say I have a custom template I've named "Shell". Inside that template, I'd like to do some conditionals and determine which content I'd like to display, so say I have something templates like "Page1" and "Page2".

    Is there a way to get this to work? I've tried:
    Code:
    <vb:raw Page1>
    and it doesn't seem to do anything.

    Thanks!

  • #2
    You need to first render the template and then you'd need to preregister it for use in the other template. Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X