Return to Snippet

Revision: 26011
at April 15, 2010 20:36 by netdoctor


Initial Code
<?php
// function getTemplateVarOutput($idnames= array (), $docid= "", $published= 1)
//$docid defaults to current document ID

$myVar = $modx->getTemplateVarOutput(array("yourTVname"),,$published=1);
$output =  $myVar['yourTVname'];

return $output;
?>

Initial URL

                                

Initial Description
Returns the value (content) of the template variable you specified in the snippet.

Initial Title
MODx - Get a Template Variable  snippet

Initial Tags

                                

Initial Language
PHP