0

I have created an external list. After it's rendered, link for each item looks like the following:

<a class="ms-listlink ms-draggable" onfocus="OnLink(this)" 
href="http://swsudc07:9100/_layouts/15/listform.aspx?PageType=4&amp;ListId=%7BE8157BAD%2D268D%2D4E14%2D877E%2D6F0227C86396%7D&amp;ID=__cg40000300k82000200020002000200530003000300030043003300&amp;ContentTypeID=0x0" 
onclick="EditLink2(this,1);return false;" target="_self" dragid="4" draggable="true">V-226STR</a>

I'd like to change the EditLink2 in onclick event to a modal dialog.

But I'm having problem finding the XSL.

I believe it's in fldtypes.xsl or vwstyles.xsl (path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\XSL)

Could someone please shed some light..

Thanks very much!!

3

Why not just switch ON the Dialogs option for your list?

This option can be found here: List settings => Advanced settings => Dialogs => switch to "Yes"

Yes, I know, I know, external lists don't seem have "Advanced settings".

But you still can get there! Do the following:

  1. Go to your external list settings page
  2. From the address bar, copy out the List parameter enter image description here
  3. Go to some normal list, go to it's settings and go to the Advanced Settings page
  4. Replace List=... part on this page with the part you copied from your external list. The url will be as follows: https://.../_layouts/15/start.aspx#/_layouts/15/advsetng.aspx?List=...
  5. Wow, now you will be able to see Advanced settings of the external list! And though most of the options are missing there, Dialogs option is not! enter image description here

I checked: this option does the work:

enter image description here

P.S. Stop using XSLT in SP2013. It's dead in 2013, really:

  1. SPD Design View killed. No more easy generating XSLT.
  2. Even though XSLT is still sort of "supported" in SP2013, in real life there are numerous bugs, which weren't there in SP2010. Reason is, they just don't test it anymore, and don't care I'm afraid. Because ALL data in SharePoint is now rendered via Client Side Rendering (CSR) by default!
  3. CSR is really better. Not perfect, but better. At least it is JS-based, and world is constantly buzzing around JS, creating new JS libraries, frameworks, etc. JS is a trend. XSLT is a dead meat.

So if you want to change rendering in SP2013, start learning CSR ;)

  • Thanks Andrey! it works!, just want to ask about the XSLT you have mentioned.. I've seen articles around on how to change XSLT, and it seems still OK in SP2013.. I do believe you, it's just if you have any examples on how buggy it is..? Thanks again!! :) – Kris Aug 26 '13 at 23:55
  • One simple example would be that grouping in DataFormWebPart/DataViewWebPart no longer works, e.g. if you migrate your old webparts from SP2010/SP2007, you will find out that groups no longer expanded/collapsed due to a bug in an assistant JavaScript. I faced this issue when I tried to migrate my own blog from SP2010 to SP2013. Quite weird issue and hard to fix. And re-implementing it in CSR is no easy work either..., so the blog is still running SP2010 so far :( P.S. Please mark my answer as accepted if it solves your problem. – Andrey Markeev Aug 27 '13 at 6:33
0

In your scenario to change the rendering of a particular field you can use the new JS Link property, below is a very good article explaining how to do this,

http://www.rbradbrook.co.uk/Blog/Post/10/Introduction-to-Client-Side-Rendering-in-SharePoint-2013

  • Thanks Msounthar! This is really good! I'm trying to find the object that holds the XML of the external content type with no luck.. do you know anything about it..? or am I going down the wrong path..? thanks again!!! – Kris Aug 27 '13 at 0:05
0

Go to list settings and in URL replace "listedit.aspx" to "advsetng.aspx"

  • 1
    Please add some more detail to this answer. Why should OP do that, and what will that lead to etc. – Robert Lindgren Aug 25 '13 at 13:39

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.