<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: MODx: data passing between snippets</title>
	<atom:link href="http://joelnagy.com/blog/2009/02/modx-data-passing-between-snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://joelnagy.com/blog/2009/02/modx-data-passing-between-snippets/</link>
	<description>web technology is a way of life</description>
	<pubDate>Sun, 05 Feb 2012 12:54:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Shane Sponagle</title>
		<link>http://joelnagy.com/blog/2009/02/modx-data-passing-between-snippets/comment-page-1/#comment-33</link>
		<dc:creator>Shane Sponagle</dc:creator>
		<pubDate>Mon, 02 Mar 2009 13:10:28 +0000</pubDate>
		<guid isPermaLink="false">http://joelnagy.com/blog/?p=69#comment-33</guid>
		<description>You will enjoy this article that describes how the MODx parser works: http://www.sottwell.com/how-modx-works.html</description>
		<content:encoded><![CDATA[<p>You will enjoy this article that describes how the MODx parser works: <a href="http://www.sottwell.com/how-modx-works.html" rel="nofollow">http://www.sottwell.com/how-modx-works.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Nagy</title>
		<link>http://joelnagy.com/blog/2009/02/modx-data-passing-between-snippets/comment-page-1/#comment-29</link>
		<dc:creator>Joel Nagy</dc:creator>
		<pubDate>Sun, 01 Mar 2009 15:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://joelnagy.com/blog/?p=69#comment-29</guid>
		<description>Shane,

I've been using MODx for only a few sparse projects here and there, so I wasn't aware of the [! !] or `[* *]` syntax.  I'll have to try these both out.  Thanx.

MODx is by far the best CMS for programmers that I've used since it allows simple direct PHP integration without the need for plugins or modifying the codebase.</description>
		<content:encoded><![CDATA[<p>Shane,</p>
<p>I&#8217;ve been using MODx for only a few sparse projects here and there, so I wasn&#8217;t aware of the [! !] or `[* *]` syntax.  I&#8217;ll have to try these both out.  Thanx.</p>
<p>MODx is by far the best CMS for programmers that I&#8217;ve used since it allows simple direct PHP integration without the need for plugins or modifying the codebase.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shane Sponagle</title>
		<link>http://joelnagy.com/blog/2009/02/modx-data-passing-between-snippets/comment-page-1/#comment-25</link>
		<dc:creator>Shane Sponagle</dc:creator>
		<pubDate>Sat, 28 Feb 2009 12:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://joelnagy.com/blog/?p=69#comment-25</guid>
		<description>Interesting approach for resolving this problem. That is one of the cool things about MODx it lets you code something simple to achieve your objectives. 

The problem you are describing is related to the sequence when items get parsed. For one snippet to know the value of the second, it needs to have that data available and if it hasn't been parsed yet it is not yet available. Another way to overcome this is to have one snippet called un-cached by using the [! !] syntax and the second snippet called using the standard cached syntax [[ ]]. This causes one snippet to be processed on one pass of the parser making its value available for the next pass which will handle the [[ ]] snippet calls.

You could also do this with a plug-in as well. So many options in MODx...it's all about solutions :)

Your approach is good, since it uses less passes of the parser it may even be more efficient (I don't know), thanks for posting this. 

Also note that you can avoid the need for the &amp;done by wrapping the placeholder in back-ticks:

[[setup?alias=`[*alias*]`]]</description>
		<content:encoded><![CDATA[<p>Interesting approach for resolving this problem. That is one of the cool things about MODx it lets you code something simple to achieve your objectives. </p>
<p>The problem you are describing is related to the sequence when items get parsed. For one snippet to know the value of the second, it needs to have that data available and if it hasn&#8217;t been parsed yet it is not yet available. Another way to overcome this is to have one snippet called un-cached by using the [! !] syntax and the second snippet called using the standard cached syntax [[ ]]. This causes one snippet to be processed on one pass of the parser making its value available for the next pass which will handle the [[ ]] snippet calls.</p>
<p>You could also do this with a plug-in as well. So many options in MODx&#8230;it&#8217;s all about solutions :)</p>
<p>Your approach is good, since it uses less passes of the parser it may even be more efficient (I don&#8217;t know), thanks for posting this. </p>
<p>Also note that you can avoid the need for the &amp;done by wrapping the placeholder in back-ticks:</p>
<p>[[setup?alias=`[*alias*]`]]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

