> > I assume you want to preserve the TT directives inside the string
> > and process them later as part of a two-step process? You have
>
> Actually, I want it to be interpreted and the appropriate tage e.g.: [%
> job %]
> be replaced with "hp" or "sum" or whatever the job might be.
Ok, then that's much simpler. Ignore my other suggestions. Simply
use double quotes (you have to escape the interior double quotes,
or switch these to single) and instead of using [% job %] inside
the string, use $job, eg:
[% is_allowed_todo(
"<A HREF=\"/job?page=CrewEditPage&job=$job&code=$ref.first\"
><font face=\"sans-serif, Arial, Helvetica\" size=\"2\">$ref.1</FONT></A>",
'MOD','_default') %]
Alternatively use a BLOCK instead of quoting the whole string
(you need to set INTERPOLATE):
[% text = BLOCK -%]
<A HREF="/job?page=CrewEditPage&job=$job&code=$ref.first"
><font face="sans-serif, Arial, Helvetica" size="2">$ref.1</FONT></A>"
[%- END; is_allowed_todo(text, 'MOD','_default'); %]
or without INTERPOLATE you can do this:
[% text = BLOCK -%]
<A HREF="/job?page=CrewEditPage&job=[% job %]&code=[% ref.first %]"
><font face="sans-serif, Arial, Helvetica" size="2">[% ref.1 %]</FONT></A>
[%- END; is_allowed_todo(text, 'MOD','_default'); %]
Craig