ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

embedding doesn't mean including!?

April 26, 2008 2:17pm

Subscribe [1]
  • #1 / Apr 26, 2008 2:17pm

    StR@ng3r

    12 posts

    I have split parts of my templates into codesegments which are embeded in the main template.

    How exactly does EE render templates? Does it include the embedded templates and then renders the whole thing or does it render every single template (the parent one that is actually called and the child ones that are included in it) all by itself.

    In other words, let’s say I have defined {assign_variable:my_template_group="site"} at the beginning of my parent template. Somewhere in it I’m embeding a template that calls this variable. Will EE know what the variable in the child template stands for or do I have to define variables in every single template that makes use of them?

  • #2 / Apr 26, 2008 2:23pm

    Lisa Wess

    20502 posts

    No, assigned variables do not carry through to embeds.  You can pass variables via embeds.  But assigned variables work only in the templates they are assigned in.  Perhaps this wiki article on Parse Order will help =)

  • #3 / Apr 26, 2008 2:28pm

    StR@ng3r

    12 posts

    Thank you. Yeah, that helps.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases