Susan is referring to the "Resource Content" field of the Create/Edit Resource panel, though putting them in the template seems fine.
Here's a generic snippet (untested) that will return the value of any TV for any Resource:
[[!ShowTv? &tvId=`12` &resourceId=`14` &render=`0`]]
<?php
/* ShowTv snippet */
$rid = $scriptProperties['resourceID'];
$render = isset($scriptProperties['render']) && $scriptProperties['render'];
$tv = $modx->getObject('modTemplateVar', $scriptProperties['tvId']);
if ($tv) {
return $render? $tv->renderOutput($rid) : $tv->getValue($rid);
} else {
return "TV Not Found";
}
If &render is 0 or missing, you'll get the raw value of the TV, which will be faster if you don't need MODX to render it.
BTW, if the value will be shared across multiple resources, you might consider making it a System Setting, which would be available anywhere as:
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
[ed. note: BobRay last edited this post 11 years, 10 months ago.]