SOLVED

Looking for Dynamic Content to Appear on View As Web Page

Go to solution
Anonymous
Not applicable

Looking for Dynamic Content to Appear on View As Web Page

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

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Looking for Dynamic Content to Appear on View As Web Page

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).

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Looking for Dynamic Content to Appear on View As Web Page

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).

Anonymous
Not applicable

Re: Looking for Dynamic Content to Appear on View As Web Page

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
Level 10 - Community Moderator

Re: Looking for Dynamic Content to Appear on View As Web Page

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.