Searching Apps & App Instances

Branch allows you to limit searches to only search one or more specific App or App Instance. 

Layouts

The default layouts and design information set in the Settings section of the Search administration will be used for search result pages.  The exception will be if the search was also limited to one or more Apps.

Supported Apps

The following App Keys are currently supported:

app
blog
calendar
classifieds
directory
document
employment
forum
gallery
members
realestate
rental
store

How to Search an App

In order for the system to recognize that it's searching within one or more Apps the App Key needs to be in the URL.

For example: http://mysite.com/search?q=search+term&a=blog

If multiple Apps are being searched then the "a" parameter get's changed to "a[]".

For example: http://mysite.com/search?q=search+term&a[]=blog&a[]=calendar

To get the App Keys in the URL you would include one or more form fields in the search form. The system will take care of adding the correct parameters and values into the URL.

Form fields for one App

If you're only searching in one App you should use the following form fields:

Hidden form field:
<input type="hidden" name="app" value="blog" />

Select menu:
<select name="app">
  <option value="blog">Blog</option>
  <option value="calendar">Calendar</option>
</select>

Radio buttons:
<label><input type="radio" name="app" value="blog">Blog</label>
<label><input type="radio" name="app" value="calendar">Calendar</label>

Form fields for more than one App

If your searching more than one App then you should use the following form fields:

Multiple hidden form fields:
<input type="hidden" name="app[]" value="blog" />
<input type="hidden" name="app[]" value="calendar" />

Checkboxes:
<label><input type="checkbox" name="app" value="blog">Blog</label>
<label><input type="checkbox" name="app" value="calendar">Calendar</label>

Notice that the form field name changed from "app" to "app[]".  The "[]" is required in order for more than one App to be searched. If that is left off then only the last App specified will be used.

How to Search an App Instance

In order for the system to recognize that it's searching within one or more App Instances the App Instance Key needs to be in the URL.

For example: http://mysite.com/search?q=search+term&ak=blog-instance

If multiple App Instances are being searched then the "ak" parameter get's changed to "ak[]".

For example: http://mysite.com/search?q=search+term&ak[]=blog-instance&ak[]=calendar-instance

("calendar-instance" should be replaced with the actual Instance Key for that app.)

To get the App Instance Keys in the URL you would include one or more form fields in the search form. The system will take care of adding the correct parameters and values into the URL.

Form fields for one App Instance

If you're only searching in one App Instance you should use the following form fields:

Hidden form field:
<input type="hidden" name="appKey" value="blog-instance" />

Select menu:
<select name="appKey">
  <option value="blog-instance">Blog Instance</option>
  <option value="calendar-instance">Calendar Instance</option>
</select>

Radio buttons:
<label><input type="radio" name="appKey" value="blog-instance">Blog Instance</label>
<label><input type="radio" name="appKey" value="calendar-instance">Calendar Instance</label>

("calendar-instance" and "blog-instance" should be replaced with the actual Instance Key for that app.)

Form fields for more than one App Instance

If your searching more than one App Instance then you should use the following form fields:

Multiple hidden form fields:
<input type="hidden" name="appKey[]" value="blog-instance" />
<input type="hidden" name="appKey[]" value="calendar-instance" />

Checkboxes:
<label><input type="checkbox" name="appKey" value="blog-instance">Blog Instance</label>
<label><input type="checkbox" name="appKey" value="calendar-instance">Calendar Instance</label>

Notice that the form field name changed from "appKey" to "appKey[]". The "[]" is required in order for more than one App Instance to be searched. If that is left off then only the last App Instance specified will be used.

("calendar-instance" and "blog-instance" should be replaced with the actual Instance Key for that app.)