Martin_Kentico
-
4/18/2006 2:01:01 PM
Re: Title Value
Hi,
The Title you are talking about is not actually Title, but node AliasName, that is limited to about 30 characters. This Alias Name is created from the actual title item value, that you set and that is part of your document, for example for CMS.Article the title item is ArticleName.
The DataSet you get is not actual value, it is set of the tables, that contains the rows filled with the document data items.
If you need to get the URL, you should use the function Functions.GetUrl(aliasPath) with the aliasPath you get from the item column "AliasPath", when you need the title, use the title column name instead of the AliasPath column name.
The code example for your case would be:
Dim ds as DataSet = Functions.GetTreeProvider().SelectNodes("/News/%", Kentico.CMS.TreeEngine.TreePathTypeEnum.AliasPath, "cms.news")
Dim url as String = Functions.GetUrl(ds.Tables(0).Rows(0).Item("AliasPath"))
Dim title as String = ds.Tables(0).Rows(0).Item("NewsTitle")
Best Regards
|