New features Please use http://kentico.uservoice.com as the primary place to submit your suggestions and allow others to vote for your ideas!
Version 5.x > New features > Add more information to the docs about using the API - DocumentAliasInfo View modes: 
User avatar
Member
Member
lancetek - 5/19/2011 8:15:35 AM
   
Add more information to the docs about using the API - DocumentAliasInfo
For example: today I couldn't find any info on how to create a new DocumentAlias and assign it to a TreeNode.

The Developer's guide API section didn't even mention DocumentAlias at all.

Thanks,
Lance

User avatar
Member
Member
kentico_michal - 5/23/2011 2:00:13 AM
   
RE:Add more information to the docs about using the API - DocumentAliasInfo
Hello Lance,

Regrettably, Developer’s guide does not cover this topic. So, I have created a new requirement for Developer’s guide. For now, I prepared a new Knowledge base article for you that gives you basic information on how to create a Document aliases using API: How to create a new document alias using API.


Best regards,
Michal Legen

User avatar
Member
Member
lancetek - 9/8/2011 10:18:08 AM
   
RE:Add more information to the docs about using the API - DocumentAliasInfo
Thanks Michal, could someone please add a way to locate document aliases for a Node?

The only thing I've found is: DocumentAliasInfoProvider.GetDocumentAliases, but it doesn' seem to return consitant results - often if I already have a document with aliases, the dataset is empty. :(

Also seeing how to use DocumentAliasInfoProvider.DocumentAliasExists() would be helpful too.

User avatar
Member
Member
kentico_michal - 9/12/2011 12:36:47 AM
   
RE:Add more information to the docs about using the API - DocumentAliasInfo
Hello,

You can get document aliases for a document using the following code:


GeneralConnection conn = ConnectionHelper.GetConnection();
// Get aliases
DataSet ds = GetDocumentAliases("AliasNodeID = " + nodeId, null, conn);
if (!DataHelper.DataSourceIsEmpty(ds))
{
// For each alias
foreach (DataRow row in ds.Tables[0].Rows)
{
DocumentAliasInfo infoObj = new DocumentAliasInfo(row);
if (infoObj != null)
{
...
}
}
}


Best regards,
Michal Legen