Re: [htmltmpl] retrieving default values
Brought to you by:
samtregar
|
From: Marcel v. D. <ma...@va...> - 2011-11-20 07:40:27
|
On 11/17/2011 10:03 PM, Marcel van Dorp wrote:
> On 11/17/2011 09:15 PM, Roger Burton West wrote:
>> On Thu, Nov 17, 2011 at 05:59:27PM +0100, Marcel van Dorp wrote:
>>> I would like to retrieve the default value from the template, eg.
>>> TMPL_VAR NAME="VAR1" DEFAULT="DEFAULTVALUE1"
>> My extension module, HTML::Template::Set, allows you to do
>>
>> <tmpl_set name="var1" value="defaultvalue1">
>>
>> and retrieve this through the query interface. If this would be useful,
>> let me know and I'll email you a copy. It predates the default= setting,
Hi Roger, list,
I have an issue with your extension H::T::Set.
In my template, I have:
Debug: <TMPL_VAR NAME="VAL1">
<TMPL_SET NAME="var1" ><TMPL_VAR NAME="VAL1"></TMPL_SET>
and in my code:
$tpl->param('val1' => "myValue"); # set TMPL_VAR
$out = $tpl->param('var1'); # retrieve TMPL_SET
But the last line returns nothing (I expected "myValue").
The output shows me the first 'Debug:' line, so I know the TMPL_VARs are
correctly set.
I've triple-checked the documentation on CPAN, but I do not see what I'm
doing wrong.
Can anyone help?
Marcel
>>
>> ------------------------------------------------------------------------------
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> Html-template-users mailing list
>> Htm...@li...
>> https://lists.sourceforge.net/lists/listinfo/html-template-users
>
|