<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UnDeprived &#187; Magic Tags</title>
	<atom:link href="http://www.un-deprived.com/tag/magic-tags/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.un-deprived.com</link>
	<description>A webdev journal of the Moninator</description>
	<lastBuildDate>Thu, 29 Jul 2010 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Pods CMS: Magic Tag</title>
		<link>http://www.un-deprived.com/2009/webdev/pods-cms-magic-tag/</link>
		<comments>http://www.un-deprived.com/2009/webdev/pods-cms-magic-tag/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 12:32:48 +0000</pubDate>
		<dc:creator>Mon</dc:creator>
				<category><![CDATA[Pods CMS]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[Magic Tags]]></category>
		<category><![CDATA[PICK column]]></category>
		<category><![CDATA[pods]]></category>
		<category><![CDATA[pods cms]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://www.un-deprived.com/?p=357</guid>
		<description><![CDATA[This is going to be a short post. Magic Tags are very awesome, but on the Pods CMS documentation failed to mention something very simple yet useful. Before anything, here’s a quick run down of what Magic Tags are… Software Note: Pods CMS 1.7.3 / WP 2.8.4 Documentation: http://pods.uproot.us/codex/magic_tags What are Magic Tags From Pods [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>This is going to be a short post. Magic Tags are very awesome, but on the Pods CMS documentation failed to mention something very simple yet useful. Before anything, here’s a quick run down of what Magic Tags are…</p>
<p><span id="more-357"></span></p>
<p><strong>Software Note</strong>: <a href='http://pods.uproot.us/' target='_blank'>Pods CMS</a> 1.7.3 / WP 2.8.4</p>
<p><strong>Documentation</strong>: <a href="http://pods.uproot.us/codex/magic_tags">http://pods.uproot.us/codex/magic_tags</a></p>
<p><strong>What are Magic Tags</strong></p>
<p>From Pods CMS’ documentation: Magic Tags are used exclusively within <strong>Pod templates</strong> to dynamically pull in column values.</p>
<p><strong>Usage:</strong> {@column_name} / {@column_name,display_helper}</p>
<p><strong>In addition to the documentation:</strong> {@column_name.another_column_name}</p>
<p>The above method allow you access a different Pod’s columns when it is a PICK column inside a pod.</p>
<p>Let’s say you have to two pods. The <em>Person</em> pod, and<em> Country</em> pod. The <em>Person </em>pod has a PICK column of the <em>Country</em> pod to identify the nationality of that person, and you want to list all the people as: Person’s Name, Country (where you want to access by: <a href="http://domain.com/person">http://domain.com/person</a>). So inside the <strong>Pod Templates</strong> you would have something like this to show:</p>



<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;p&gt;{@name}, {@country}&lt;/p&gt;</pre></div></div>


<p>The above displays something like below on the <em> Person</em> list page (<em><a href="http://domain.com/person">http://domain.com/person</a></em>): </p>



<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Mon Lu, United States
John Smith, Canada
Ken Yamamoto, Japan</pre></div></div>


<p>Now you want to get a bit sophisticated that you want to link the person’s name to its own detail page, and the country is linked to its own page listing all the people from that country or something like that. Not only that, you want to link the page using its own slugs/permalinks like this: <em><a href="http://domain.com/person/mon_lu">http://domain.com/person/mon_lu</a></em> and <em><a href="http://domain.com/country/usa">http://domain.com/country/usa</a></em> – assuming you have a  column named <em>slug</em> in the <em>Person</em> pod, and or <em> abbrv</em> in the <em>Country</em> pod. Before I figured this out, I used a <a href="/2009/webdev/pods-cms-display-helpers/">Display Helper</a> to grab the <em>abbrv</em> from the <em>Country </em>pod. But the easier way is the following, assuming this is still <em><a href="http://domain.com/person">http://domain.com/person</a></em> listing all the people where the <em>Country</em> pod is a PICK column inside the <em>Person</em> pod:</p>



<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;p&gt;&lt;a href=&quot;/person/{@slug}&quot;&gt;{@name}&lt;/a&gt;&lt;a href=&quot;/country/{@country.abbrv}&quot;&gt;{@country}&lt;/a&gt;&lt;/p&gt;</pre></div></div>


<p>Simple enough, yeah? </p>
<p><!-- PHP 5.x --></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.un-deprived.com/2009/webdev/pods-cms-magic-tag/feed/</wfw:commentRss>
		<slash:comments></slash:comments>
		</item>
	</channel>
</rss>
