Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [Andy] What is the right way to call this Variable on Detail page?: Edit Log

Here is the list of edits for this post
Re: [Andy] What is the right way to call this Variable on Detail page?
For certain cities (example: New York, Dallas, Houston, etc. ) I need to have city name as suffix for keya, keyc & keym.

i.e. for listings under Dallas,
keya outout would ideall be 'value for keya dallas'

& for listings under New York,
keya outout would ideall be 'value for keya New York'

& for listings under Houston,
keya outout would ideall be 'value for keya Houston'

etc..

While for certain listing, I need to have state name as Prefix for certain key values.

I understand I can use conditions like
if rand1 = a, .. 'desired output'
elsif rand1 = b, 'desired output '
etc..

However, using if/elsif it would mean, I would need to use 26 if/elsif for each rand.. :(

---------------------------------
However, if this work: (first post method)
<%set var1 = 'key'%>
<%set var1 .= $rand1%>
<%var1%>

It would save significant parsing & processing too.

Vishal
-------------------------------------------------------

Last edited by:

VishalT: Mar 10, 2020, 12:14 PM

Edit Log: