I have found how to open any link in modal view thanks to the JS OpenPopUpPage* on publishing pages.
I would like to use this also with the links I have in my page layout (created by snippets), so that a link is always opened in modal view (in my case I have a "more info" link on every page, but its URL is different depending on the page).
With a normal link I use a snippet of a hyperlink column in the page layout, but if I am using the JS link format I did not success. I have created a text column with the JS link (with a calculated column)
< a href="#" onclick="OpenPopUpPageWithTitle('myDynamicURL',null,width,height,'title ')">My link</a>'
But when I try to use it programmatically (in a snippet), it does not work, SP does not interpretate it as a valid link. Does anybody has a solution or a workaround for it?
HTML Code Rendered
<a href="#" onclick="OpenPopUpPageWithTitle('myURL',null,800,600,'Topics and discussions')">DISCUSSIONS</a>.....
a no working one (coming from a snippet):
<div data-name="Page Field: MoreInfoJava"><a href="#" onclick="OpenPopUpPageWithTitle('<a href="MyURL',null,800,700,'More">myURL',null,800,700,'More</a> info')">More info</a> </div>