Frequently Asked Questions v2
|FAQ Main / Answer Detail|
Author: Jakub email@example.com
<input type=hidden name="slices" value="517d65d9936c98a1537a5fecbddc7d42">
<!-- news -->
<input type=hidden name="slices" value="849d65d9936c98a1537a5fecbddc7d52"> <!-- events -->
<!-- news --> are useful because you perhaps
don't remember, which slice has which id (
All other settings remain the same as in the usual searchform. The only difficulty is that sometimes the field ids do exist in some slice and do not exist in another one. Than you must rename the fields (menu Slice Admin --- Change field IDs).
To view the items found, you must set the same aliases (Searchform extensions etc.) in all the slices searched through. Each item will be shown using the aliases of the slice to which it belongs.
Tip: If you want to show checkboxes to choose in which slices to search, use something like
<input type=checkbox name="slices" value="517d65d9936c98a1537a5fecbddc7d42"
<input type=checkbox name="slices" value="849d65d9936c98a1537a5fecbddc7d52" checked> Events
The discussions are not stored in the same database tables as other item content. You may use the conds[discussion] parameters, e.g.
<input type=hidden name="conds[discussion][subject]"
<input type=hidden name="conds[discussion][body]" value="1">
Specify the discussion fields in which to search: you may use this fields ---
date, subject, author, e_mail, body, state, flag, url_address,
url_description, remote_addr, free1 or free2. The other fields (conds[operator], conds[value] etc.) remain the same as usual.
To view the discussion items found include aa/discussion.php3 by SSI. You must pass a view ID of some discussion view to the script, e.g. when the view ID is 22:
The top HTML code, index view code and bottom HTML code are used to create a listing of the items found, nothing other.
To show hierarchical constants like in the AA control panel Edit item, use the aa/hiercons.php3 script. You must send the following to the script:
The SSI include for a hierarchical constant group "Keywords" may look like
One benefit: fillform.php3 knows how to refill multiple select boxes as well.
The keywords selected by the user will be joined by OR or AND, that means any keyword or all keywords must be present in an item. You must specify the operator by conds[valuejoin], e.g.
<input type=hidden name="conds[valuejoin]" value="OR">
Tip: If you want to show a select box to choose whether the keywords should be joined by OR or AND, use something like
<option value="OR">Find items with ANY keyword
<option value="AND">Find items with ALL keywords
If you want the user chooses keywords from a multiple select box, use the similar settings as in hierarchical constants: set the name of the select box to [value], e.g.
<select name="conds[value]" multiple>
and add the [valuejoin] field (see above).
Last Edit: Aug 17 2011
<aafaq id=1707> ~ToDo: 1707 Searchform extensions </aafaq>
This FAQ interface was developed by Jason at Commons.ca
ActionApps is a free software content management system initiated by
the Association for Progressive Communications (APC)
APC - Internet and ICTs for social justice and development