Looking for Dynamic Content to Appear on View As Web Page | Community
Skip to main content
February 15, 2016
Solved

Looking for Dynamic Content to Appear on View As Web Page

  • February 15, 2016
  • 1 reply
  • 2637 views

Hi all! Back again.

Thanks to your help, I've figured out how to create tokens to render my dynamic content. Yay! However, I'm noticing that when I click on the "View as Web Page" link, the web page view shows the token code, not the dynamic content. Any idea how I can fix that?

Thank you!

-Alex

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Velocity scripts are not rendered in HTML View.  Best practice is to tag dynamic content with a special CSS class (like "dynamic-content") that will be hidden in the HTML View.

If your script only operates on lead fields, you can duplicate the logic in JavaScript and import the script into HTML View.  If you're using custom objects, though, this isn't gonna fly (because you can't access the raw values).

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
February 15, 2016

Velocity scripts are not rendered in HTML View.  Best practice is to tag dynamic content with a special CSS class (like "dynamic-content") that will be hidden in the HTML View.

If your script only operates on lead fields, you can duplicate the logic in JavaScript and import the script into HTML View.  If you're using custom objects, though, this isn't gonna fly (because you can't access the raw values).

February 15, 2016

Awesome, thank you.

My JavaScript skills are firmly in the "beginner" zone... would you be able to point me in the right direction for how to set that up?

SanfordWhiteman
New Participant
February 15, 2016

My JavaScript skills are firmly in the "beginner" zone... would you be able to point me in the right direction for how to set that up?

You should hire a JS developer for this.  While not really advanced, there's no general-purpose recipe here.  The only general part is using what I call a Data Transfer Object, which is an HTML DIV that holds a JSON block, to transfer data from the lead database into the page.  What you do with that data has infinite variety.