+ Start a Discussion
Carsten BONOMOCarsten BONOMO 

Use Custom Label as href

Hello,

I would like to use a custom label to set the value of a href. This is the line of code I want to change :
<a class="primary" href="my_link">Help Centre</a>

I tried <a class="primary" href="{!$label.my_link}">Help Centre</a> to no success.

A lot of thanks for any help,
Carsten
 
Best Answer chosen by Carsten BONOMO
piyush_sonipiyush_soni
its means you don't have any custom label with name 'VoucherApp_Success_Help_Link'. please double check the spelling

All Answers

piyush_sonipiyush_soni
try this one :
<apex:outputLink value="{!$label.my_link}">Help Centre</apex:outputLink>
Let us know if it helps you
 
Carsten BONOMOCarsten BONOMO
Hi, thanks for your quick response

I tried your suggestion and got the following : Error: Field $Label.VoucherApp_Success_Help_Link does not exist. Check spelling
Where VoucherApp_Success_Help_Link is the name of my Custom Label.

Thanks a lot
piyush_sonipiyush_soni
its means you don't have any custom label with name 'VoucherApp_Success_Help_Link'. please double check the spelling
This was selected as the best answer
Carsten BONOMOCarsten BONOMO
<a class="primary" href="{!$label.VoucherApp_Success}">Help Centre</a> worked

I mixed up the description and name of the label. Thank you very much