If you're using Taxonomy to organize your articles, you can create a menu item which displays a search form to filter articles by Taxonomy terms a visitor chooses from a list you define. To do so, you must first create a Filter to define the search form elements under Components > Taxonomy > Filters. Once you have the Filter created, follow these instructions.
Add a menu item to search content by Taxonomy Terms
To add a menu item:
- Go to Menus > Main Menu (or the menu where the menu item is located)
- Click New
- Under Select Menu Item Type, click Taxonomy
- Under Search, click the layout you wish to use. To review the differences between the List and Summary layouts, click here.
- In the Title field, type the name of the menu item that you wish to display to the end user
- Leave the Alias field blank. Non-Profit Soapbox will automatically create a web-friendly URL for you based on the title field. If you would like to customize the url, you can do so by entering text in the Alias field.
- Under Parent Item, select the appropriate menu item the new link should fall under. If it is a main level item, do not select anything.
- For Access Level, leave it as Public. If you have a password-protected area of the site and wish to only display this menu item to logged in users, choose Registered.
- In On Click, Open In, select "New Window with Browser Navigation". NOTE: This is to follow standard web practice of opening external links in new windows in order to keep your own website open for the end user.
For List Layout
In the right column, for Parameters (Basic):
- To display results only from a given content Section, select the section in the drop down; otherwise, leave it as "- Select Section -".
- To display results only from a given content Category, select the category in the drop down; otherwise, leave it as "- Select Category -".
- Choose the Filter you wish to use as the search form for the visitor
- For Filters Connector, select the logical connector between the Term Elements of your filter. OR shows articles matching any of the terms selected by the visitor. AND shows articles matching all of the terms selected by the visitor. GROUP shows articles matching any terms selected in on Term Element group and also matching any terms selected in another Term Element group. In most instances, you will want to select GROUP.
Clear as mud, right? How about an example? You are creating a form to allow visitors to search your publications by type and by topic. For your Filter, you create one Term Element called Publication Type with the terms Newsletter, Press Release, and Media Coverage as check box options. You create a second called Topic with the terms Health, Economy, and Environment as check box options. A visitor selects Press Release and Media Coverage from Publication Type and Economy and Environment from Topic. Here are how the various options would filter the article results:
1) OR: Displays any articles which have the term Press Release OR Media Coverage OR Economy OR Environment applied
2) AND: Displays only articles which have all four terms applied
3) GROUP: Displays all articles which have either Press Release OR Media Coverage AND either Economy OR Environment applied - For Description, choose to Show or Hide a description to appear above the search form
- For Description Text, enter the description you wish to show. Basic HTML is permitted here.
- For Display #, select the number of articles you wish to appear per page in the table format upon initial load of the results
- For Table Headings, select Yes, if you would like to display the column titles, or No, if you would like to hide them
- For Date Column, choose Show or Hide to control display of the Created Date for the article
- For Date Format, input a date format, if you would like to override the default format for your site. To construct your own format, review the options here - or submit a ticket.
- In the next several fields, customize the No Results Message, Taxonomy Search Title, Search Button, Cancel Button, and the text appearing after the number of results found
- If you would like to give visitors the ability to search the list of articles based on Title, Date, or Hits by entering a text into a field, select Show. If you would like to simply show the list of articles associated with the term you selected earlier, select Hide.
- For Filter Field, if you have chosen to Show the Filter, you can choose Title, Date or Hits. In most circumstances, you will wish to choose Title.
- For Show All Results, choose to show or hide the initial list of all articles prior to the visitor selecting terms and clicking search. Generally, you will wish to set this to Show.
For Parameters Advanced:
- Click the Parameters Advanced title to open the module and see it's options
- For Primary Order, select the order in which you wish the articles to appear
- For Pagination, Show or Hide the pagination at the bottom of the table. In nearly all circumstances, it will be best to leave this as Show. For instances where fewer articles are returned than the number chosen in Display # earlier, the pagination will be hidden automatically.
- For Display Select, choose Show to allow visitors to change the number of articles appearing per page by changing a drop down value. Select No to hide this drop down.
- For Show a Feed Link, choose Yes to display an RSS feed link in the visitor's browser bar. This will allow them to subscribe to the list of articles through an RSS feed reader of their choosing, such as Google Reader. If you do not wish to display this, choose No.
- For Hits, choose Show or Hide to display a column in the table showing the number of times visitors have viewed a given article
For Summary Layout
In the right column, for Parameters (Basic):
- To display results only from a given content Section, select the section in the drop down; otherwise, leave it as "- Select Section -".
- To display results only from a given content Category, select the category in the drop down; otherwise, leave it as "- Select Category -".
- Choose the Filter you wish to use as the search form for the visitor
- For Filters Connector, select the logical connector between the Term Elements of your filter. OR shows articles matching any of the terms selected by the visitor. AND shows articles matching all of the terms selected by the visitor. GROUP shows articles matching any terms selected in on Term Element group and also matching any terms selected in another Term Element group. In most instances, you will want to select GROUP.
Clear as mud, right? How about an example? You are creating a form to allow visitors to search your publications by type and by topic. For your Filter, you create one Term Element called Publication Type with the terms Newsletter, Press Release, and Media Coverage as check box options. You create a second called Topic with the terms Health, Economy, and Environment as check box options. A visitor selects Press Release and Media Coverage from Publication Type and Economy and Environment from Topic. Here are how the various options would filter the article results:
1) OR: Displays any articles which have the term Press Release OR Media Coverage OR Economy OR Environment applied
2) AND: Displays only articles which have all four terms applied
3) GROUP: Displays all articles which have either Press Release OR Media Coverage AND either Economy OR Environment applied - For Description, choose to Show or Hide a description to appear above the search form
- For Description Text, enter the description you wish to show. Basic HTML is permitted here.
- Customize how the page appears by selecting how many articles appear and in which fashion. The standard that many sites use is:
# Leading: 0
# Intro: 10
# Columns: 1
# Links: 0 - For Article Info, choose to show or hide the article's author, date, and section/category
- In the next several fields, customize the No Results Message, Taxonomy Search Title, Search Button, Cancel Button, and the text appearing after the number of results found
- For Show All Results, choose to show or hide the initial list of all articles prior to the visitor selecting terms and clicking search. Generally, you will wish to set this to Show.
For Parameters Advanced
- For Category Order, keep the default item unless you wish the results to appear first by the Category they are in
- For Primary Order, choose the order in which you wish the articles to appear
- For Multi Column Order, if you have chosen multiple columns in Parameters (Basic), select whether the ordering should flow down the rows or across the columns
- For Pagination, select whether or not you would like the pagination navigation to appear
- Pagination Results determines whether or not "Page X of Y" is displayed at the bottom of the page. To use the default on the site, choose Use Layout Configuration or select Hide or Show for the individual menu item
- For Show a Feed Link, choose Yes to display an RSS feed link in the visitor's browser bar. This will allow them to subscribe to the list of articles through an RSS feed reader of their choosing, such as Google Reader. If you do not wish to display this, choose No.
- Show Intro Text determines whether or not the article text before the Read More link is displayed along with the article title. To use the default on the site, choose Use Layout Configuration or select Hide or Show for the individual menu item.
- Read More Link determines whether or not a Read More link appears at the bottom of the intro text for articles with a Read More link inserted. To use the default on the site, choose Use Layout Configuration or select Hide or Show for the individual menu item.
- Linked Titles determines whether or not the title for an article is hyperlinked to the full text of the article.To use the default on the site, choose Use Layout Configuration or select Hide or Show for the individual menu item.
Edit a menu item
To edit a menu item:
- Go to Menus > Main Menu (or the menu where the menu item is located)
- Open the menu item you wish to update
- Change the parameters as noted above
- Click Save