Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
multisearch :label and image in results.

 

 


rez
User

Aug 10, 2011, 10:53 PM

Post #1 of 4 (2497 views)
Shortcut
multisearch :label and image in results. Can't Post

1. Is there a way to display an uploaded image in the results of a multisearch. Like showing this for product results:
Name
Description
thumbnail image

2. Well what else CAN we show in results? Just a titleField and summaryField? Name and description is working fine below. I'd like some more options / advancements / details. If that's our only to options, what else can go in them? Like is there a way to show a record in results that has a checkbox toggled?

3. Is there any way to search the label list of an item? In this case, it's an item with a category name/num list from another table. If a category was "12 inch latex balloons" and someone searched "balloon", all the balloon products would appear in the results that had their category set to 12 inch latex balloons. That would be great. Otherwise, if the :label doesnt work, i'm guessing it's just searching through the "num" of the category. :( Example that's not working:


Code
      $searchTables = array(); 
$searchTables['items'] = array(
'viewerUrl' => 'itemDetails.php',
'titleField' => 'name',
'summaryField' => 'description',
'searchFields' => array('name','description','category:label'),
);


thanks. I'm very glad i finally got this working. Hoping to get a little fancier. :)


(This post was edited by rez on Aug 11, 2011, 11:14 AM)


Jason
Staff / Moderator


Aug 11, 2011, 1:32 PM

Post #2 of 4 (2205 views)
Shortcut
Re: [rez] multisearch :label and image in results. [In reply to] Can't Post

Hi,

1) Since uploads are stored in a different table, multi-search doesn't have a way of returning uploaded records.

2) You can select up to 10 different fields from the section by using the "field" 1-10 option. For example, if you wanted to return the createdDate field, you can do this:


Code
$searchTables = array();  
$searchTables['items'] = array(
'viewerUrl' => 'itemDetails.php',
'titleField' => 'name',
'summaryField' => 'description',
'searchFields' => array('name','description','category:label'),
'field1' => 'createdDate',
);



3) List labels are not actually stored in the database, only the values, so there isn't a simple way of searching the labels.

If you want to do more complex searches, you may want to consider searching your sections 1 at a time, and then combining the results to output. This would probably give you a greater degree of flexability.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


zip222
User

Jan 13, 2012, 8:38 AM

Post #3 of 4 (667 views)
Shortcut
Re: [Jason] multisearch :label and image in results. [In reply to] Can't Post

Is is possible to use that "field1" in the outputted results? If so, how?


zip222
User

Jan 13, 2012, 9:03 AM

Post #4 of 4 (665 views)
Shortcut
Re: [zip222] multisearch :label and image in results. [In reply to] Can't Post

nevermind...


Code
echo $record['field1']


doh!