Richard
Richard

Reputation: 11

Hyperlink to Document Library by Id?

In Sharepoint 2007, when linking to a folder or file in a Document Library, the url is long and cumbersome. Is it possible to link by the ID field?

e.g., http://domain/path/doclib/Forms/AllItems.aspx?ID=275

Upvotes: 1

Views: 5810

Answers (2)

Rich Bennema
Rich Bennema

Reputation: 10335

I know you asked specifically about 2007, but SharePoint 2010 has a cool new Document ID feature that will allow you to refer to any document in the Site Collection using the following format:

http://[sitecollectionurl]/_layouts/DocIdRedir.aspx?ID=[documentID]

Upvotes: 0

AyKarsi
AyKarsi

Reputation: 9675

Whats the problem with http://domain/sites/whatever/Lists/Announcements/DispForm.aspx?ID=1&Source=http%3A%2F%2Fmoss2007dev%3A20000%2Fsites%2Farcnet%2FLists%2FAnnouncements%2FAllItems.aspx

If you remove the Source parameter your left with Whats the problem with http://domain/sites/whatever/Lists/Announcements/DispForm.aspx?ID=1. The only problem you'll have then is that the cancel button will not necessarly return you where you came from. (The cancel button would send you back to the default view as far as I know..)

On the other hand you could sneak in some code which does the redirect from a view or actually opens the document.

Upvotes: 1

Related Questions