web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Portal: how to render HTML in Metadata Label with liquid

(0) ShareShare
ReportReport
Posted on 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
I have the same question (0)
  • Suggested answer
    Inogic Profile Picture
    703 on at

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans