Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a new Document Library and have added the content type "link to a document" to the library. Somehow when I create a new "link to a document" item in the library the dialog won't open. Instead I'll be redirected to NewLink.aspx. The other content types open in a dialog without exeption.

I'm using the new button in the ribbon.

Has anyone ever tried to change this behavior using code so that the newlink.aspx will open in a modal dialog ?

Any hints on this?

The "Launch forms in a dialog (Check yes)" won't work because this behavior only happens for certain content types.

share|improve this question

2 Answers 2

Go to document library settings > Advanced Settings >
Launch forms in a dialog (Check yes) and Save.

It should work.

share|improve this answer
    
Thanx but no. This only happens to certain content types. –  Stefan Bauer Jun 2 '12 at 9:47
    
Please mention the site template for the site where your document library is located. And secondly is this a SharePoint generated document library or a custom created one ? –  Arko D Jun 2 '12 at 10:12
3  
Stefan - since your question did not mention specifically if your are using any custom content types so I asked you concerning the content types because I tried the same with a out of the box library and it worked just fine before I replied. --- Now we are all here to collaborate and learn. And I do care about what I reply and validate before sharing something. –  Arko D Jun 2 '12 at 14:37
3  
My answers have been responsible so far in this forum and would request you to extend the basic courtesy to people who are trying to answer or solve your problem. Forgive me if the answer you seek is not correct from my side but the tone of your comment is just not something commendable on a technical forum like this. Thanks. –  Arko D Jun 2 '12 at 14:41
1  
Guys, I think this is more to do with language. The original question was perhaps not crystal clear and Moss was doing his best to understand and help. Stefan, I think your comment comes across as rather rude and I suspect that this was not your intention. Let's keep it polite, bear in mind that english is not everyone's first language, and try to help each other. Thanks. [moderator] –  SPDoctor Jun 3 '12 at 17:44

You can use JavaScript to do this.

"<a onclick='javascript:SP.UI.ModalDialog.showModalDialog({ url: "
               + string.Format("\"{0}?ID={1}\", title: \"{2}\"", listName, itemID, item.Title)
               + " }); return false;' href=''>"
               + item.Title
               + "</a>";

This code gets JavaScript to create a dialog (provided the setting that Moss mentions is enabled).

Further reading can be found here: http://blogs.msdn.com/b/sharepointdev/archive/2011/06/23/how-to-open-a-list-form-in-a-modal-dialog-box.aspx

share|improve this answer
    
Do you use the new link from the ribbon? The problem is only certains dialogs won't open in a modal dialog from the ribbon new button. –  Stefan Bauer Aug 3 '12 at 15:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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