Search Results.. summary
2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 27, 2012 (RSS)
By s2smedia - April 27, 2012
I have the search function set up.. but it is only showing title/summary..
How I can I set it up to show other fields for the records its searching?
here how the php is set up:
$searchTables['girls_tournaments'] = array(
'viewerUrl' => 'girls-tournament.php',
'titleField' => 'title',
'summaryField' => 'city',
'searchFields' => array('title','city'),
);
How I can I set it up to show other fields for the records its searching?
here how the php is set up:
$searchTables['girls_tournaments'] = array(
'viewerUrl' => 'girls-tournament.php',
'titleField' => 'title',
'summaryField' => 'city',
'searchFields' => array('title','city'),
);
Re: [s2smedia] Search Results.. summary
By Jason - April 27, 2012
Hi,
You can get the multi search function to return up to 10 other fields from your record. You add an option of 'field#' (ie, field1, field2, ...field10) and tell the function which field should be returned.
for example, if you wanted to return the createdDate, and content, fields you could do this:
You would then refer to them in your foreach loop as field1, field2, etc
Hope this helps
You can get the multi search function to return up to 10 other fields from your record. You add an option of 'field#' (ie, field1, field2, ...field10) and tell the function which field should be returned.
for example, if you wanted to return the createdDate, and content, fields you could do this:
$searchTables['girls_tournaments'] = array(
'viewerUrl' => 'girls-tournament.php',
'titleField' => 'title',
'summaryField' => 'city',
'searchFields' => array('title','city'),
'field1' => 'createdDate',
'field2' => 'content',
);
You would then refer to them in your foreach loop as field1, field2, etc
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/