Skip to content

Instantly share code, notes, and snippets.

@jamiepittock
Created February 11, 2009 22:06
Show Gist options
  • Save jamiepittock/62298 to your computer and use it in GitHub Desktop.
Save jamiepittock/62298 to your computer and use it in GitHub Desktop.
{exp:weblog:entries}
{exp:my_module:my_method}
{if alt_title != ""}{alt_title}{if:else}{title}{/if}
{/exp:my_module:my_method}
{/exp:weblog:entries}
function my_method() {
global $TMPL;
$html = $TMPL->tagdata;
echo $html;
}
If I run my_method $html prints as {if The alt title != ""}The alt title{if:else}The title{/if}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment