title: How to #set a variable to make it available in an included velocity template
body: <p>I'm creating a custom theme for Liferay, I wish to include the footer within each page layout individually. Unfortunately, I don't appear to have access to the $full_templates_path variable within the page layout files. I have had no luck manually storing the value with #set and then accessing that value within the included template.</p>
  
  <p>In a vanilla theme, processing of files is something like this:</p>
  
  <pre><code>portal_normal.vm:
    1) some init, doctype, etc.
    2) #parse("$full_templates_path/header.vm")
    3) $theme.include($content_include)
      a) custom_layout_1.tpl
      b) chat portlet
    4) #parse("$full_templates_path/footer.vm")
  </code></pre>
  
  <p>For layout purposes, I need to deviate from this pattern, like so:</p>
  
  <pre><code>portal_normal.vm
    1) some init, doctype, etc.
    2) #parse("$full_templates_path/header.vm")
    3) $theme.include($content_include)
      a) custom_layout_1.tpl
        i) #parse("$full_templates_path/footer.vm")
      b) chat portlet
  </code></pre>
  
  <p>When I try this, tomcat errors out because $full_templates_path is not defined within custom_layout_1.tpl. I tried to fix this problem by doing the following within portal_normal.vm</p>
  
  <pre><code>#set($full_footer_path = "$full_templates_path/footer.vm")
  $theme.include($content_include)
  </code></pre>
  
  <p>And then, within custom_layout_1.tpl, I do this where I'd like the footer markup emitted:</p>
  
  <pre><code>#parse("$full_footer_path")
  </code></pre>
  
  <p>However, tomcat still errors out, saying that $full_footer_path is not defined.</p>
  
  <p>When I hard-code the value of $full_templates_path into #parse statement in custom_layout_1.tpl, everything works fine, but that seems like a hack to me.</p>
  
  <p>Ideally, this should do the right thing for the right reasons, not just because I used a lot of duct tape.</p>
  
  <p>Any suggestions for ways to implement the inclusion of a template file from within a custom page layout?</p>