byron-falcon-software
-
8/13/2009 11:00:14 AM
Using a Document Selector - Turn GUID into Document or Document URL/Document Link
We have a custom data type that uses a Document Selector as a field so that the client can select the location of a More Info type of link.
This field returns the GUID of the Document but I can't for the life of find the way to load the document with a GUID as no TreeHelper function does it or CMSContent.GetDocumentURL uses a standard document id as an integer. Utlimately, this needs to be a link on the page to the alias for the documents, a friendly URL, so that their SEO isn't screwed up with some GUID or alias path on a query string type of scenario.
Maybe there is a better way to do that with a different field type for our custom type, but for now, answering how to load a document with a GUID is probably also going to help on other things.
I actually assumed when I first started Kentico when I saw the GUID of the Nodes that everything would be GUID in the API, especially the getting of documents, and I am actually very disappointed that it isn't.
It would save a lot of headache to just go fully GUID depenedent for current and versions of documents, like Documentum, or at least have GUID version of the GetSingleNode or something tanglible like that.
|