API Questions on Kentico API.
Version 6.x > API > TreeProvider Alias Paths View modes: 
User avatar
Member
Member
adil.abdullah-bagnetworks.com - 5/15/2012 4:33:10 AM
   
TreeProvider Alias Paths
Hi,

Does anyone know if I can specify multiple alias paths when invoking SelectNodes on a TreeProvider?

What I am trying to do is query multiple paths. E.g.

/Blogs/%
/WorkGroups/%

I have tried specifying both paths separated by ; however the SelectNodes just returns no results.

Is the only solution to invoke SelectNodes multiple times once for each aliasPath and merge them?

(the reason I do not just use /% as the alias path is I am not interested in all folders).

Cheers,

Adil

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 5/15/2012 6:09:07 AM
   
RE:TreeProvider Alias Paths
Hi,

Unfortunately, this is not supported. You can select data twice and then merge results. Or you can use one query, set the path to /% and configure where parameter of the SelectNodes method.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
adil.abdullah-bagnetworks.com - 5/15/2012 8:02:17 PM
   
RE:TreeProvider Alias Paths
Hi,

Ok thanks that confirms what I had seem, I like the suggestion of the SelectNodes method though, that would give the the result that I want.

Thanks,

Adil

User avatar
Member
Member
adil.abdullah-bagnetworks.com - 5/15/2012 9:59:04 PM
   
RE:TreeProvider Alias Paths
That does work ok. However the search does not return any Projects/ Project tasks.

Is it intentional that the API misses projects?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 5/16/2012 3:11:13 AM
   
RE:TreeProvider Alias Paths
Hi,

what do you mean exactly? The Tree provider class selects only documents. Would you like to select projects, from the project management module?

In this case you can find related API examples here:
Project management API

Best regards,
Ivana Tomanickova

User avatar
Member
Member
adil.abdullah-bagnetworks.com - 5/16/2012 3:35:00 AM
   
RE:TreeProvider Alias Paths
Hi,

Yes that was the idea to search projects from the project management module, as well as Wiki's, blogs, documents, work groups, news, events.

The aim is to do a search based on full text e.g. name, description, created by, updated by, meta tags (custom tags are to be added to various content), owning path/ Project/ blog.

The results need to be sorted and grouped into sections based on the meta tags, with hyperlinks to their original content.

In addition for some types of document/ projects (Again based on the meta tags) a link will be displayed to show any related documents/ projects/wiki's in a time line format.

It looks like a combination of the TreeProvider and ProjectTaskInfoProvider would give me what I need.

However would this method be the recommended route to follow? Or am I using the wrong api's entirely?

Cheers,

Adil

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 5/21/2012 2:46:51 AM
   
RE:TreeProvider Alias Paths
Hi,

in case you would like to search in all these document types and project task, I suggest you to use smart search module. You will create an appropriate index. For project task you can use General index type:
General index

Then in case you prefer to use API for searching and creating of results data source you can use a smart search API:
Smart search API

Best regards,
Ivana Tomanickova