Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Question on __TAG__ variables
blacke
Hi,
I'm trying to figure out how to use the __TAG__ directive. The following is in the attached file, but basically, I have a set of radio buttons with values 1-9 with 1 as the default:
starting_point => [ label => 'Starting point of workflow?: ',
html => '<input type="radio" name="startp" ' .
'value="1" CHECKED>Create Workspace<br>' .
'<input type="radio" name="startp" ' .
'value="2">FTP files from remote server<br>' .
'<input type="radio" name="startp" '.
'value="3">Unzip new FTP files<br>' .
'<input type="radio" name="startp" '.
'value="4">Sort files and fix names<br>' .
'<input type="radio" name="startp" '.
'value="5">Bundle for CD backups<br>' .
'<input type="radio" name="startp" '.
'value="6">Copy to predeploy area<br>' .
'<input type="radio" name="startp" '.
'value="7">Clean old cycles<br>' .
'<input type="radio" name="startp" '.
'value="8">Deploy to STAGE<br>' .
'<input type="radio" name="startp" '.
'value="9">Deploy to PROD<br>',
is_required => 'false',
],
Then, later, I want to add "start='t'" where the selected radio button equals a specified index:
<template_script><![CDATA[
my $sp = __TAG__( 'start_pointing' );
__INSERT__( $sp );
__INSERT__( "TAG: __TAG__( 'starting_point' );" );
__INSERT__( "VALUE: __VALUE__( 'starting_point' );" );
if( $sp eq "1" ) {
__INSERT__( "start='t'" );
}
]]></template_script>
Those three adjacent __INSERT__ directives are just so I could output the values. Leaving the radio button on the default, I get this output:
5
TAG: 1
VALUE: __VALUE__( 'starting_point' );
And the if statement fails obviously. I don't get it. Could someone explain how this works? The workflow documentation doesn't clarify this for me.
Thanks,
Eric
Find more posts tagged with
Comments
Adam Stoller
__TAG__() should only be used within XML context.
__VALUE__() should only be used within Perl context.
__INSERT__() is essentially a bridge that exists within XML context but the enclosed portion of it is processed as being within Perl context.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
blacke
Thanks. That's more clear than what's in the docs.