Is it possible to create variables that are readable by "content.var"?

Example:

[code][
#assign counter = [1, 2, 3]]
[#list counter as ctaCounter]
   [#assign ctaLinkType = "cta"+ctaCounter+"link"]
    <p>${ctaLinkType}</p>
    [#assign ctaLinkType2 = content.ctaLinkType]
[/#list]
[/code]

Where I would usually get the content with:
[code]
[#if content.cta1link?has_content]
${content.cta1link!}
[/#if]
[/code]

I know there is a better way to build a component than to have 3 fields (by 
multiValueFieldDefinition), but I have it on running on public and would like 
to improve the code I have.

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=62871b07-a72f-4263-b178-6061aff9fb70


----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <dev-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to