Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : 6sXo6W3ANGd+d5t3yjKC7j
Customer experience | Sales, Customer Insights,...
Suggested answer

Portal: how to render HTML in Metadata Label with liquid

Like (0) ShareShare
ReportReport
Posted on 8 Nov 2020 12:24:47 by 5

hi, in Dynamics Portal I have HMTL in metadata label ( Red bold font). 

I have also put placeholder for the whole label <span class="ABC">label text</span>

I created a site settings with the new value for the label I need (call it ABCnew)

In liquid I have a script that calls for the <span placeholder and replaces it with site settings value ABCnew.

The problem is when I run the script it does not render my <span class="ABC">label text</span> placeholder because I have inside label text more html (for red bold font).

<script>

.....
if (valueinplaceholder >0){
$(valueinplaceholderl).text("{{valueinSiteSetting }}");
}
</script>
IF it does not have HTML inside <span> placeholder, the script works, but when I have more HTML within that <span> placeholder the script does not work.
Any ideas please? 
Much appreciated
  • Suggested answer
    Inogic Profile Picture
    438 on 10 Nov 2020 at 07:47:29
    RE: Portal: how to render HTML in Metadata Label with liquid

    Hi,

    Please try adding the below code to your page, it worked on my side.

    <span id="myText">Sample Test</span>

    <script>

       $('#myText').text("Sample Test Updated");

    </script>

    In a similar manner, you can set the dynamic value in your Span element.

    Hope this helps!

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,411 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,552 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading complete