Calling sub-template with parameter
Hello,
I am trying to conditionally print a logo in a subtemplate by passing a data element from the sample xml to the sub template as follows:
I defined a sub-template as follows:
<?template:LOGO?><?param:p_logo;string('NA')?>
<?choose:?>
<?when:$p_logo=’March’?>
Some Logo
<?end when?>
<?when:$p_logo=’January’?>
Some Other Logo
<?end when?>
<?otherwise:?>
Otherwise logo
<?end otherwise?>
<?end choose?>
<?end template?>
Then I call this template LOGO as follows:
<?call@inlines:LOGO?>with-param:p_logo;MONTH?><?end call?>
Here MONTH is the data element in the sample xml.
What I find is that not matter what value is passed in MONTH, the sub template always prints the "Otherwise logo". What am i doing wrong? I am attaching the RTF template with sample data.