First, thanks for your help. You’re a star!
Unfortunately it’s not working for me just yet. So, here’s a run-down of what I did...
To make clickable emails:
-Made a TV called ’email’ type text, no widget, in a category called ’contact’, available to ’review’ template, saved
-Made a snippet called ’emailclick’ in the ’contact’ category, and pasted in the code you supplied, but replaced your ’emailtv’ with my ’email’, saved, looks like this...
<?php
$TVname = ’email’;
if( $TVarray = $modx->getTemplateVarOutput(array($TVname)) ){
$tvOutput = $TVarray[$TVname];
if(empty($tvOutput)) return ’’; //bail out if no value
return ’<a href="mailto:’.$tvOutput.’">’.$tvOutput.’</a>’;
}
?>
-In the ’review’ template, I put [[emailclick]] where I want the email address to appear, looks like this...
<td><p>[*address*], phone [*phone*]</p> <p>[[emailclick]]</p> <p>[*website*]</p></td>
<<--! I know, I know, tables are no good! But this is actually tabular info, remainder of template uses divs !-->
-The TV field appears in manager and I can put an address there, but no email address shows on preview.
To make clickable URLs:
-Made TV called ’website’, type URL, Hyeperlink widget, target blank, all other fields left with no value, saved
-In the ’review’ template I put [*website*] where I want the URL to appear
-Works fine in manager and preview page (yay!), BUT when I go to re-edit/re-save the document in manager and don’t change the website field, it changes
http://www.mysite.com to $vwww.mysite.com on preview, and then also on re-re-edit in manager. Looks like some PHP thing going on here to me.
Your thoughts and time here are very much appreciated. This is still 1000% easier for me than Drupal (no offence Drupalers, possibly my limitations more than yours!)
Oh, by the way, ObfuscateEmail works a charm, thanks especially for that!