Gossamer Forum
Home : Products : Gossamer Links : Discussions :

What is the right way to call this Variable on Detail page?

Quote Reply
What is the right way to call this Variable on Detail page?
Within detailed.html page, I have added the following:

<%set keya = 'value for keya'%>
<%set keyb = 'value for keyb'%>
<%set keyc = 'value for keyc'%>
... till...
<%set keyz = 'value for keyz'%>


Suppose a Link (example: link id = 2) has following link properties:

rand1 = r
rand2 = u
rand3 = i
rand4 = y
rand5 = a
rand6 = o
rand7 = w
rand8 = p
..till..
rand26 = z


Now.. Ideally what I want to do is, in detailed.html wherever there is <%var1%>, it should display output for <%keyr%> & for <%var2%> it should display output for <%keyu%> (since value for rand1 = r, & rand2 = u).


I understand I can do this: (& create values for var1 to var26)
<%set var1 = 'key'%>
<%set var1 .= $rand1%>

So now var1 = keyr

<%set var2 = 'key'%>
<%set var2 .= $rand2%>

So now var2 = keyu

...
till..
<%set var26 = 'key'%>
<%set var26 .= $rand26%>




However, when I type in <%var1%> it outputs 'keyr' & not 'value for keyr'. (I even tried <%$var1%>, but no success.. I understand I am not using the right code :( )


So, what would be the right way to display value from the appropriate 'key' variable for desired 'var'. So in the above case:

<%var1%> would output value for 'keyr'
<%var2%> would output value for 'keyu'
<%var3%> would output value for 'keyi'
... till ...
<%var26%> would output value for 'keyz'


Thank you.

Vishal
-------------------------------------------------------
Subject Author Views Date
Thread; hot thread What is the right way to call this Variable on Detail page? VishalT 9198 Mar 9, 2020, 4:03 AM
Thread; hot thread Re: [VishalT] What is the right way to call this Variable on Detail page?
Andy 9100 Mar 10, 2020, 3:25 AM
Post; hot thread Re: [Andy] What is the right way to call this Variable on Detail page?
VishalT 9093 Mar 10, 2020, 7:59 AM
Thread; hot thread Re: [Andy] What is the right way to call this Variable on Detail page?
VishalT 9086 Mar 10, 2020, 11:16 AM
Thread; hot thread Re: [VishalT] What is the right way to call this Variable on Detail page?
Andy 9071 Mar 11, 2020, 12:40 AM
Thread; hot thread Re: [Andy] What is the right way to call this Variable on Detail page?
VishalT 9058 Mar 11, 2020, 6:03 AM
Thread; hot thread Re: [VishalT] What is the right way to call this Variable on Detail page?
VishalT 9046 Mar 11, 2020, 3:55 PM
Thread; hot thread Re: [VishalT] What is the right way to call this Variable on Detail page?
Andy 9042 Mar 12, 2020, 12:12 AM
Thread; hot thread Re: [Andy] What is the right way to call this Variable on Detail page?
VishalT 8942 Mar 18, 2020, 8:53 AM
Thread; hot thread Re: [VishalT] What is the right way to call this Variable on Detail page?
Andy 8940 Mar 18, 2020, 8:57 AM
Thread; hot thread Re: [Andy] What is the right way to call this Variable on Detail page?
VishalT 8931 Mar 18, 2020, 9:25 AM
Thread; hot thread Re: [VishalT] What is the right way to call this Variable on Detail page?
Andy 8932 Mar 18, 2020, 9:28 AM
Post; hot thread Re: [Andy] What is the right way to call this Variable on Detail page?
VishalT 8922 Mar 18, 2020, 9:28 AM
Thread; hot thread Re: [Andy] What is the right way to call this Variable on Detail page?
VishalT 8923 Mar 18, 2020, 9:29 AM
Post; hot thread Re: [VishalT] What is the right way to call this Variable on Detail page?
Andy 8917 Mar 18, 2020, 9:31 AM
Thread; hot thread Re: [Andy] What is the right way to call this Variable on Detail page?
VishalT 8918 Mar 18, 2020, 9:32 AM
Thread; hot thread Re: [VishalT] What is the right way to call this Variable on Detail page?
Andy 8915 Mar 18, 2020, 9:34 AM
Thread; hot thread Re: [Andy] What is the right way to call this Variable on Detail page?
VishalT 8908 Mar 18, 2020, 9:42 AM
Post; hot thread Re: [VishalT] What is the right way to call this Variable on Detail page?
Andy 8897 Mar 18, 2020, 10:16 AM