Searching for files and .PageLink

Vote:
 

I'm having problems when searching for files, the problem is this:

I am using different search start pages (using .PageLink) to limit results, this works as it should, but when I am searching for files using the EPiServer CMS Indexing Service and Ifilter, it completely disregards the start page/.PageLink setting.

SearchDataSource.PageLink = new PageReference(int.Parse(SearchRoot.SelectedValue));
... Where SearchRoot is a drop down box populated with page Id's.

Any thoughts?

Cheers,
Rasmus

#54210
Oct 05, 2011 11:35
Vote:
 

Well, the files aren't related to a place in the page tree, strictly speaking. But perhaps you can dynamically set the SearchLocations property to the unified file system path you want to search. If it is the page files perhaps you can get the path to the page's files using the PageData's GetPageDirectory method.

#54212
Oct 05, 2011 13:24
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.