Custom Labels do not store dynamic or active content. Their design purpose is to support internationalization and translation. While you can include in a Custom Label substitution points, like {0}
and {1}
, as used with String.format()
, I don't think that's the most suitable solution for building templated links.
You can use this type of templating in a Custom Link or in a formula field using the HYPERLINK()
function. Your Visualforce can, of course, reference the content of a custom formula field.
In a Visualforce context, if you prefer not to create a custom formula field to hold such a link, you can construct the link yourself using Apex logic or Visualforce expressions. The URL template itself might best be stored in a Custom Setting.