Oh, I gotcha.
In this case, an embed is probably a better option.
Think of it this way. At the point Snippets are parsed, it’s one to one replacement of that variable with your snippet code. So if you pop open system/expressionengine/libraries/Template.php, look around line 320, and you’ll see:
/** -------------------------------------
/** Parse manual variables and Snippets
/** -------------------------------------*/
// These are variables that can be set in the path.php file
if (count($this->EE->config->_global_vars) > 0)
{
$this->log_item("Snippets (Keys): ".implode('|', array_keys($this->EE->config->_global_vars)));
$this->log_item("Snippets (Values): ".trim(implode('|', $this->EE->config->_global_vars)));
foreach ($this->EE->config->_global_vars as $key => $val)
{
$this->template = str_replace(LD.$key.RD, $val, $this->template);
}
// in case any of these variables have EE comments of their own
$this->template = $this->remove_ee_comments($this->template);
}
Right after that code block you can add:
echo '<pre>';
echo htmlentities($this->template);
echo '</pre><p>‘; exit;
</pre>
And when you visit the template, in your browser, you get:
{exp:channel:entries channel="pages" disable="categories|category_fields|member_data|pagination|trackbacks" rdf="off"}
{if no_results}
{redirect="404"}
{/if}
{embed="includes/_header" title="{title}"}
<aside id="promo">
{embed="includes/_left_col"}
</aside>
<section id="featured-content">
///
{exp:channel:entries channel="articles" disable="categories|category_fields|custom_fields|member_data|pagination|trackbacks" dynamic="no" rdf="off" limit="3"}
{title}
{/exp:channel:entries}
///
</section>
<section id="article-list">
<header>
<h1>{recent_health_articles}</h1>
</header>
{embed="includes/_recent_articles" limit="3"}
</section>
<section id="featured-book">
<header>
<h1>{from_our_library}</h1>
</header>
{embed="includes/_featured_book"}
</section>
<aside id="related">
{embed="includes/_right_col"}
</aside>
{embed="includes/_footer"}
{/exp:channel:entries}
Then, we eventually move on to parsing of the exp tags, and you’re in a situation with nested tags.
Make sense?
-greg