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)
Templating
s_devata
I have a following DCR.I want to use the value of the QTQuestion label attribute in the tpl file.please suggest me.
<QTForm .............>
<QTsection ........>
<QTSubSection ........>
<QTQuestion label="This is first question" ............>
<QTQuestion label="This is second question" ............>
</QTQuestion>
</QTSubSection>
</QTSection>
</QTForm>
How will I get the the questions dynamically?
Find more posts tagged with
Comments
hemranga
Do you have QTQuestion in the DCT as a field which is a replicant? then you can iterate through the values in tpl right?
This is simple...or else i have not rightly understood your problem. PLease let me know whether i have understood or else what is the actual requirement?
Hemanth R
s_devata
Hi Hemant,
First of all thanx for ur reply.I have used the iterate and tried to grab the values in the tpl.
All the questions are replicants and I have QTQuestion in the DCR.How do I attain the value of the label?
I have used the following code:
<iw_iterate list ='dcr.QTQuestion' var='ques'>
<iw_value question='ques.label />
</iw_iterate>
Could u please suggest me or send me any sample code which will serve the purpose.
iwovjames
I don't know if this will work, but have you tried:
<iw_iterate list ='dcr.QTQuestion' var='ques'>
<iw_value question='ques@label />
</iw_iterate>
The ques.label you tried would mean that label is a separate subelement of QTQuestion, not an attribute ot it. In XPATH, sometimes the attributes are referenced with the @ symbol instead.
Hope this helps.
s_devata
HI hemant the code which u suggested is not working.
Could u please suggest me something else.
If u have got any sampple tpl files which take take replicant values,please send me. Here all the questions have got the same attribute called label.How can I distinguish a particular question.
Please once aqain check the code which I have written first.
thanx and regards,
sushant.