API Questions on Kentico API.
Version 6.x > API > Get document URL of culture View modes: 
User avatar
Certified Developer 9
Certified Developer 9
jali-scor - 5/31/2012 7:55:52 AM
   
Get document URL of culture
I can't find a way to retrieve the culture's document URL (aliaspath) which can be added in the properties>url of a node.

I like to retrieve the culture's document URL based on an aliaspath so I can get the following URL's depending on which culture is viewed:
- http://www.site.com/en-US/search
- http://www.site.com/nl-NL/zoeken
- http://www.site.com/de-DE/suchen

How can I accomplish this?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/2/2012 8:27:37 AM
   
RE:Get document URL of culture
Hello,


If you need to get the document aliases, please see here: Document aliases API examples.

If you need to get the DocumentURLPath property, you can get it if you select a node (Documents API examples) and access its DocumentURLPath property.

The API Reference is here: Kentico CMS API.


Best regards,
Helena Grulichova

User avatar
Certified Developer 9
Certified Developer 9
jali-scor - 6/18/2012 5:17:49 AM
   
RE:Get document URL of culture
Thanks for the reply, Helena.

In Kentico 5 I was able to retrieve the correct value in the DocumentURLPath by selecting the node.

With the Kentico version I'm using now (v6.0.4297) the value of the DocumentURLPath is empty even if I added URL paths for the different cultures.

Do you know if this is a bug?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/26/2012 3:50:21 AM
   
RE:Get document URL of culture
Hello,

The DocumentURLPath column stores the value of:

document Properties -> URLs -> Document URL path: Path or pattern

The Document aliases are stored in the CMS_DocumentAlias table.

I am not aware of any bug related this. Please note that if you use workflow, these tables only contains the current publish version.


Best regards,
Helena Grulichova

User avatar
Certified Developer 9
Certified Developer 9
jali-scor - 6/27/2012 9:05:26 AM
   
RE:Get document URL of culture
Thanks for the reply.

The Aliases property was the one where I could retrieve the URL's.

http://devnet.kentico.com/docs/devguide/document_aliases_api_examples_managing_document_aliases.htm for a sample code how to work with document aliases