cancel
Showing results for 
Search instead for 
Did you mean: 

list of nodes at a particular location?

charlie22
Champ in-the-making
Champ in-the-making
How would I create a Web Script that lists all the nodes at a particular location?
4 REPLIES 4

sbuckle
Champ in-the-making
Champ in-the-making

charlie22
Champ in-the-making
Champ in-the-making
Thank you very much for the links!!

So, I created a Web Script, but I'm not getting the results back that I expected.  I think it has to do with the query of a luceneSearch that I am making?  I think the format of the query is not right.  Can you tell me if the query is correct? 

var query = "+ASPECT:\"amo:imageGallery\"";
    query += ' +PATH:"/app:company_home/Gallery/IMAGE/OtherGalleries/City/*"';   

model.resultset = search.luceneSearch(query);

I think I have made an error in my use of PATH.

sbuckle
Champ in-the-making
Champ in-the-making
You can't use the namespace prefix in the ASPECT clause - you have to use the (full) URL.
More info here: http://wiki.alfresco.com/wiki/Search#Finding_nodes_that_have_a_particular_aspect.

Also (most) folder names, which are defined in the content model, have to be prefixed with "cm"; it's also worth noting that spaces have to encoded as "_x0020_".

Try this:


var query = "+ASPECT:\"{http://www.your-url.blah}:imageGallery\"";
query += ' +PATH:"/app:company_home/cm:Gallery/cm:IMAGE/cm:OtherGalleries/cm:City/*"';   

charlie22
Champ in-the-making
Champ in-the-making
Yes, thank you very much!!  That worked!!