need help in declaring variable

47 views
Skip to first unread message

bwj....@gmail.com

unread,
Mar 28, 2014, 4:36:41 AM3/28/14
to reddot-c...@googlegroups.com
Hi All,
I need a help in declaring String variable in page template

 My scenario will like this 
1. declare variable say x
2. if (true)

    x="First String"

else
 
 x= "Second String"

3. Print value of x

Tim D

unread,
Mar 31, 2014, 12:07:37 PM3/31/14
to reddot-c...@googlegroups.com
A custom render tag is the best solution. https://knowledge.opentext.com/knowledge/cs.dll/open/32102516

The Store rendertag and the option to use pre-execution can fail on special characters.


Best,
Tim Davis

Tim D

unread,
Mar 31, 2014, 12:56:14 PM3/31/14
to reddot-c...@googlegroups.com
Do you really need to store or can you conditionally just write the string you want?

Amit bhardwaj

unread,
Apr 2, 2014, 1:06:34 PM4/2/14
to reddot-c...@googlegroups.com
Hi Tim,
Thanks for your reply, i dont want to store just write and display


--
You received this message because you are subscribed to a topic in the Google Groups "RedDot CMS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reddot-cms-users/n7Rhvc-AJIo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reddot-cms-use...@googlegroups.com.
To post to this group, send email to reddot-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/reddot-cms-users.
For more options, visit https://groups.google.com/d/optout.

Joel Kinzel

unread,
Apr 8, 2014, 12:13:43 PM4/8/14
to reddot-c...@googlegroups.com
What does "X" represent? Is it a placeholder? Are you simply checking if it has a value associated with it? If so you can use a conditional block.

Otherwise you can write an IF statement using RQL. 
<reddot:cms>
<if>
<query valuea="" operator="==" valueb="Bool:True">
<htmltext>It was true</htmltext>
</query>
<query type="else">
<htmltext>It was false</htmltext>
</query>
</if>
</reddot:cms>

Jian Huang

unread,
Apr 8, 2014, 1:46:54 PM4/8/14
to reddot-c...@googlegroups.com
Hi Joel,


He was already using the IF statement using rendertag, so I am waiting for additional info (should he post more) to make his question more clear because it appears he might have answered his own question.
Reply all
Reply to author
Forward
0 new messages