Content by Search – Open link in Modal dialog

Changes made to Display Template |

<div
class=”cbs-pictureOnTopImageContainer”
id=”_#= pictureContainerId =#_”>

<a
class=”cbs-pictureImgLink”
href=”#”
onclick=”javascript: SP.UI.ModalDialog.showModalDialog({ url: ‘_#= linkURL =#_’, title: ‘_#= $htmlEncode(line1) =#_’ }); return false;”
id=”_#= pictureLinkId =#_”> _#= pictureMarkup =#_ </a>

</div>

 

2 thoughts on “Content by Search – Open link in Modal dialog

  1. Looks great. How would I apply this to a search results webpart that gets items from a defined result (a list)? Do I apply this to the display or the item template?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s