Please find a new version of AjaxSearch. Version
1.6.2 based on version 1.6. This new version includes functionalities of the 1.6.1 version. Functionalities described on the previous post.
This new version brings selection of document IDs where the search occurs. The new parameters are :
&
parents [comma-separated list of integers MODx document IDs] (optional)
A list of parent-documents whose descendants you want searched to &depth depth when searching.
All parent-documents by default
&
depth [int] (optional)
Number of levels deep to go.
Any number greater than or equal to 1. 25 levels by default. It could be enought
&
documents [comma-separated list of integers MODx document IDs] (optional)
A list of documents where to search
Some examples :
[!AjaxSearch!]
search in all the documents
[!AjaxSearch? &documents=`2,3,8,16`!]
search in the documents 2,3,8,16 only
[!AjaxSearch? &parents=`5,7`!]
search in all the son-documents of father-documents 5 and 7
[!AjaxSearch? &parents=`5,7` &depth=`2`!]
search on 2 levels in the son-documents of father-documents 5 and 7
I will propose this new version to Kylej too.
Next step : i would like to add a ditto-like filter to avoid some documents.
Param: filter
Purpose:
Only show items meeting a criteria
Use in the format field,criteria,mode with the comma being the local delimiter
*Mode* *Meaning*
1 - !=
2 - ==
3 - <
4 - >
5 - <=
6 - >=
7 - Text not in field value
8 - Text in field value
In order to avoid some documents in tree documents.
Do you think that it could be usefull or not ?
the code of this 1.6.2 version could be downloaded at :
http://modxcms.com/forums/index.php/topic,19755.msg123847.html#msg123847
Look at the second post. Thanks for your feedbacks if any.