Using search layouts in Module Layouts
Accrisoft Freedom provides very powerful search functions for membership and custom directories, and offers almost unlimited options for setting them up. These searches provide website users with many ways to filter data so they can find exactly what they're looking for.
Adding a Search Layout
When you create a custom directory, two searches will automatically be created along with it. The Membership Module doesn't have any default search layouts, but you can create one by clicking the Add a new Module Layout button and selecting "Membership (Search)."
To be visible on a module layout, the search has to be inserted as a variable. For example, when you create a new custom directory lister, it adds two variables by default. These are [[layout.directory_search1]] and [[layout.directory_search2]]. These are in directory lister layouts by default, but if they've been removed, you can find them in the "Insert a variable" menu, which you can access by clicking the first icon in the toolbar just above the HTML body of the module layout.
Setting Up Searches
A search layout has two main sections: the Conditions section at the top and the HTML Layout at the bottom. There are up to three conditions that can be used for a search, named "And 1," "And 2," and "And 3." Each of these conditions has a Fields List and an Output Method.
The HTML Layout section determines how the search appears on the live website. To display a condition on the live site, it must be added to this section with an include. For example, the [[and1_input]] variable will add the "And 1" input into the layout. You will also need a "go" button to perform the search. The default button is: <input type="image" name="submit" value="Go" src="graphics/config/go.gif" style="vertical-align:bottom; border:0" />.
The Fields List contains the fields from the directory to be searched. To view the available fields, click on the green plus sign and add them to the list. The format is internal name, comma, display name. Fields are separate by line breaks.
Field type determines how each condition will display on the live website.
- Composite provides a single text box that allows users to search across all fields in the Fields List.
- Field displays a drop-down menu for selecting which field users would like to search, as well as a search bar. The drop-down menu contains all of the fields that in the Fields List.
- Select provides a drop-down menu for all the possible values you can search for. It's more useful for directories with several items with an attribute in common.
- Multi-select is similar to Select, except it searches through all fields in the Fields list rather than just the first one.
- Radius is used for directories where items have address information, such as store locations. This lets users enter an address into the search bar and see a list of the closest stores to them and how far away each one is. This works with the Google Module in Blue.
To watch a video about search layouts from the Accrisoft Video Library, click here.