greets,
in the dct, have a container where combination is set to OR, options are either A or B. now the TPL, I am attempt to capture the value selected by the following line of code:
my $numberOfStories = iwpt_dcr_value('dcr.mediabar-template');
it seems that the only value captured is A even though B was selected. attempted to define as an array with no success. any assistance would be greatly appreciated!
here is the snippet from the DCT:
data-capture-requirements name="mediabar-template">
ruleset name="dct">
root-container name="mediabar-template" location="mediabar-template" combination="or">
container name="a" location="a" label="a">
.........
/container>
container name="b" location="b" label="b">
.........
/container>
/root-container>
/ruleset>
/data-capture-requirements>
here is a snippet from DCR where A was selected:
mediabar-template
A
typeoflink /typeoflink
linktostory /linktostory
headline /headline
subhead /subhead
abstract /abstract>
expiredate /expiredate>
leftimage /leftimage>
boximage /boximage>
tooltip /tooltip>
/A
/mediabar-template
here is the DCR where B was selected:
mediabar-template>
B>
stories>
story>
typeoflink>Content /typeoflink>
linktostory>test1.xhtml /linktostory>
headline>headline1 /headline>
subhead>sub-heading1 /subhead>
/story>
story>
typeoflink>Content /typeoflink>
linktostory>test2.xhtml /linktostory>
headline>headline2 /headline>
subhead>sub-heading2 /subhead>
/story>
expiredate>2007-02-20 /expiredate>
leftimage>leftSideImage.jpg /leftimage>
boximage>rightSideImage.jpg /boximage>
tooltip>tolslkjnfd /tooltip>
/stories>
/B>
/mediabar-template>
here is the TPL code:
<br> use TeamSite:

T::iw_perl;<br> <br> my %tempHash = ();<br> my $tempVariable;<br> my $boxID;<br> my $title; <br> (my $workareaPath = iwpt_get_flag_param('-iw_include-location')) =~ s|\\|/|g;<br> (my $dcrPath = iwpt_get_flag_param('-iw_pt-dcr')) =~ s|\\|/|g;<br> my $numberOfStories = iwpt_dcr_value('dcr.mediabar-template');<br> <br> if($numberOfStories = "A"){<br> .....<br> iwpt_output("slot id=\"" . $numberOfStories . $boxID . "\"");<br> iwpt_output("<image>" . $workareaPath . $tempHash{leftimage} . "</image>");<br> iwpt_output("<thumbnail>" . $workareaPath . $tempHash{boximage} . "</thumbnail>");<br> iwpt_output("<tooltip>" . $tempHash{tooltip} . "</tooltip>");<br> iwpt_output("<title>" . $title . "</title>");<br> iwpt_output("<stories>");<br> iwpt_output("<expiredate>" . $tempHash{expiredate} . "</expiredate>");<br> iwpt_output("<story id=\"1\">");<br> iwpt_output("<contentpath>" . $workareaPath . $tempHash{linktostory} . "</contentpath>");<br> iwpt_output("<type>" . $tempHash{typeoflink} . "</type>");<br> iwpt_output("<headline>" . $tempHash{headline} . "</headline>");<br> iwpt_output("<subheadline>" . $tempHash{subhead} . "</subheadline>");<br> iwpt_output("<abstract>" . $tempHash{abstract} . "</abstract>");<br> iwpt_output("</story>");<br> iwpt_output("</stories>");<br> iwpt_output("</slot>");<br> }<br> elsif($numberOfStories = "B"){<br> ....<br> iwpt_output("<slot id=\"" . $numberOfStories . $boxID . "\">");<br> iwpt_output("<image>" . $workareaPath . $tempHash{leftimage} . "</image>");<br> iwpt_output("<thumbnail>" . $workareaPath . $tempHash{boximage} . "</thumbnail>");<br> iwpt_output("<tooltip>" . $tempHash{tooltip} . "</tooltip>");<br> iwpt_output("<title>" . $title . "</title>");<br> iwpt_output("<stories>");<br> iwpt_output("<expiredate>" . $tempHash{expiredate} . "</expiredate>");<br> iwpt_output("<story id=\"1\">");<br> iwpt_output("<contentpath>" . $workareaPath . $tempHash{linktostory1} . "</contentpath>");<br> iwpt_output("<type>" . $tempHash{typeoflink1} . "</type>");<br> iwpt_output("<headline>" . $tempHash{headline1} . "</headline>");<br> iwpt_output("<subheadline>" . $tempHash{subhead1} . "</subheadline>");<br> iwpt_output("</story>");<br> iwpt_output("<story id=\"2\">");<br> iwpt_output("<contentpath>" . $workareaPath . $tempHash{linktostory2} . "</contentpath>");<br> iwpt_output("<type>" . $tempHash{typeoflink2} . "</type>");<br> iwpt_output("<headline>" . $tempHash{headline2} . "</headline>");<br> iwpt_output("<subheadline>" . $tempHash{subhead2} . "</subheadline>");<br> iwpt_output("</story>");<br> iwpt_output("</stories>");<br> iwpt_output("</slot>");<br> }<br> else{ iwpt_output("ERROR: Incorrect story option. Can only be one or two stories."); }<br>