I am working on a custom action in the item_commonhoverpanel_actions display template that links to the item properties (dispform.aspx) of the item. So far it's working, however I would like to show the item properties in a modal dialog through the onclick event. So far I am not able to get this done. Below is my code that adds a custom action to the hover panel.
<!--#_ var viewDocumentUrl = ctx.CurrentItem.ParentLink;
viewDocumentUrl = viewDocumentUrl.replace("AllItems.aspx","");
var viewDocumentHtml = String.format('<a href="{0}DispForm.aspx?id={1}" title="{3}">VIEW PROPERTIES</a>',
$htmlEncode(viewDocumentUrl), $htmlEncode(ctx.CurrentItem.ListItemID), $htmlEncode(ctx.CurrentItem.Title));
_#-->
Now what I would like to do is add an onlick="show modal dialog". I can't find a solution to this. Is it even possible to place an onclick within a String.format? I am not a javascript expert so any help is appreciated.
Thanks