Hi all,
I am using the following code:
#set($downloadLink={
"BPDCS":{
"title":"BPD Case Study",
},
"DACS":{
"title":"Deny All Case Study",
},
"IVCS":{
"title":"Infovista Case Study",
},
"EBSCS":{
"title":"ESSEC Case Study",
},
"KDSCS":{
"title":"KDS Case Study",
}
})
<ul>
#foreach ($key in $lead.downloadcenter.split("[;]"))
#set ($key = ${key.trim()})
<li><a href="${downloadLink.get($key).link}" target="_blank" class="mktNoTrack">$downloadLink.get($key).title</a> : $downloadLink.get($key).link</li>
#end
</ul>
The second call to $downloadLink.get($key).link displays the URL OK. But the first one in the href returns an error when we click the link.
For those who want to see it working, try this form: inficiences
Any help is welcome
-Greg
Solved! Go to Solution.
It's not really a reference-as-literal. But it is a bug (not in Velocity but in the way Marketo post-processes VTL output).
Do you see the same when you strip the http:// from the URL and hard-code it in the <a href=> (as we would outside of Velo)?
It's not really a reference-as-literal. But it is a bug (not in Velocity but in the way Marketo post-processes VTL output).
Do you see the same when you strip the http:// from the URL and hard-code it in the <a href=> (as we would outside of Velo)?
Hi Sanford,
Thx this is working.
For a reference, the right code is:
#set($downloadLink={
"BPDCS":{
"title":"BPD Case Study",
"link":"infos.inficiences.com/rs/593-IYJ-660/images/Inficiencespartners-casestudy-bpd-digitalisation-marketing-systeme-information-marketing-commercial.pdf"
},
"DACS":{
"title":"Deny All Case Study",
"link":"infos.inficiences.com/rs/593-IYJ-660/images/Inficiencespartners-casestudy-denyall-marketing-automation.pdf"
},
"IVCS":{
"title":"Infovista Case Study",
"link":"infos.inficiences.com/rs/593-IYJ-660/images/Inficiencespartners-casestudy-infovista-systeme-information-marketing.pdf"
},
"EBSCS":{
"title":"ESSEC Case Study",
"link":"infos.inficiences.com/rs/593-IYJ-660/images/Inficiencespartners-casestudy-essec-conception-deploiement-strategie-acquisition-nurturing.pdf"
},
"KDSCS":{
"title":"KDS Case Study",
"link":"infos.inficiences.com/rs/593-IYJ-660/images/Inficiencespartners-casestudy-kds-nouvelles-pratiques-generation-demande-automatisee.pdf"
}
})
<ul>
#foreach ($key in $lead.downloadcenter.split("[;]"))
#set ($key = ${key.trim()})
<li><a href="http://${downloadLink.get($key).link}" target="_blank" class="mktNoTrack">$downloadLink.get($key).title</a> : $downloadLink.get($key).link</li>
#end
</ul>
Useful to be used for a download center together with a unique field displayed in forms as a checkboxes.
-Greg