Magic Tags
dynamically pull column values into Pod Templates
Magic Tags allow you to dynamically pull column values into Pod Templates. When using Magic Tags with PHP, keep in mind that PHP will run before Magic Tags do, so you can't reference them unless you use get_field.
Format
This is the format in which to use Magic Tags within templates. NOTE: The "display_helper" value of the Magic Tag is optional and should be the name of the helper.{@column_name, display_helper}
Built-in Magic Tags
These Magic Tags are available to choose from in addition to the column names.
// The item's Name
{@name}
// The item's ID
{@id}
// The item's Pod Type
{@type}
// The date the item was Created
{@created}
// The date the item was Last Modified
{@modified}
// The DEFAULT detail page URL -- set from "Detail Page" in Pod settings
{@detail_url}
Examples
Below are a few examples of how you would use Magic Tags within your templates.
// Display the "body" column's value
{@body}
// Pass the "date" column's value through the "format_date" display helper
{@date, format_date}
// Get a PICK (relationship) field's name value
{@ideas.name}
// Get a File column's URL location
{@my_file_field.guid}
// Using Magic Tags with PHP
// (in Templates and Helpers, use $this to reference the current Pod)
<?php
if(strlen($this->get_field('favorite_food'))>0)
{
?>
My favorite food: {@favorite_food}
<?php
}
?>