cancel
Showing results for 
Search instead for 
Did you mean: 

Search for a document type in a specific folder

i200
Champ in-the-making
Champ in-the-making
Hi,

Im trying to make a web script that does a search for a Document Type in a user specified folder. Something like this works fine:

query = 'TYPE:"intranet:billing" AND PATH:"/app:company_home/st:sites/cm:Intranet//*""';

But i wonder if theres an easier way to handle this because i must convert the user input "/intranet" to "/app:company_home/st:sites/cm:Intranet//*".

I was looking at something easy/efficient like:

nodes = companyhome.childByNamePath(args.folder);
query = 'TYPE:"intranet:billing" AND PATH:"nodes"';

But i cant get it to work.

Any ideas?

Thanks in advance 🙂
1 REPLY 1

zladuric
Champ on-the-rise
Champ on-the-rise
Does the user always enter a full site? Is the user searching from site dashboard (so you could add site and possibly path ot the query) or from user dashboard as well?