which one is best to use to access custom labels from Skuid ? (I found couple of ways - please read the post)

  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hello All,

I found couple of ways to access custom labels from Skuid.

1. skuid.utils.mergeAsText("global","{{$Label.YOUR_LABEL}}");
2. skuid.$L('YOUR_LABEL','someValue');

I am looking for an expert opinion/best practice insights into this point.

Which of these above would be great to implement and can anyone throw some light on differences ?
Photo of Kvin Cloud

Kvin Cloud

  • 282 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,300 Points 5k badge 2x thumb

Technically both work to show labels, though in general you'll probably want to use skuid.$L('LABEL','defaultValue'). You would use skuid.utils.mergeAsText("global","{{$Label.YOUR_LABEL}}") if you wanted to escape HTML; for example, if you had "&" in your label and wanted it to show as "&" instead of "&".