[ic] Re:User tag with interpolation

Krishna interchange-users@icdevgroup.org
Tue Sep 24 11:04:01 2002


Hi List, 

I posted previous message and now got the solution for the same.
Here when we  are using the named parameters, by keeping the tag
variable in double quotes the variable will be interpolated.

For Eg:
This will not work :
Ship Price:->[ship_price sku=[scratch strSku] a AL
Interpolate=1][/ship_price]

This will work:
Ship Price:-> [ship_price sku="[scratch strSku]" a AL
Interpolate=1][/ship_price]

If any more Ideas will be highly appreciated.

Thanks & Regards,
Krishna



My previous query
------------------------------------------------------------

I created user defined tag like below. 

UserTag ship_price Interpolate 
UserTag ship_price HasEndTag 
UserTag ship_price Order sku rates code 
UserTag ship_price Routine <<EOF 
sub { 
my ($sku, $rates, $code) = @_; 
return $sku; 
} 
EOF 

And I am accessing this tag as follows: 

[tmp strSku]1550[/tmp] 
[scratch strSku] 
Ship Price:->[ship_price [scratch strSku] a AL
Interpolate=1][/ship_price] 

But the tag is not interpolating. 

But when I use this Tag without any Tags in it (without interpolation) I
am getting the desired results. 

For Eg: 
[tmp strSku]1550[/tmp] 
[scratch strSku] 
Ship Price:->[ship_price 1234 a AL Interpolate=1][/ship_price] 

It returns Ship Price:->1234. 

Inspite of declaring my UserTag as "UserTag ship_price Interpolate" why
it is not interpolating??? Can any one let me know what is the problem
for not interpolating my Variables or is there any thing wrong with the
code?? 

Please help me 

Regards, 
Krishna