1

I have a Summary Link web part. On click of one of the links in the webpart I want an aspx page to be opened as a modal pop up.

The challenge is where to put this javascript code?

1

You can put down the code in a js reference it directly in the aspx page. The js file can be put the Style Library.

Another option is to put the js code in a Script Editor WebPart. Just add the webpart > Edit webpart > add snippet in a <script> tag

This cant be done with Content Editor Webpart without embedding ( setting a html as a source to CEWP)

Refer this for using the script editor web part

1

On the same page where you have Summary Link WebPart, you can place a Content Editor Web Part which you can utilize to write down JavaScript code.

Have a read on how to Add Script into a Content Editor Web Part (CEWP) in SharePoint

0

You can also try to create your own XSL template in ItemStyle.xsl file (/Style Library/XSL Style Sheets), where you can adjust your custom script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.