Using Search Profiles

Introduction
A search profile is a predefined search query where its search results are displayed in a block positioned on some Drupal pages. These search profiles are normally used to display list of information that match a search query. Search profiles are also to some extend aware of their context. For example, if the main topic of a page is about  and if we have a search profile that displays list of events, then when the search profile is used in the context of that page about cancer, then cancer related events should be displayed. That is one of the core purpose of the search profiles.

Three things needs to happen with search profiles
 * 1) Initially, the search query to be used in a search profile need to be created using the OSF Query Builder
 * 2) Then the search profile need to be embedded into a Drupal Block
 * 3) Finally, the Block need to be positioned in the Drupal portal

Saving a Search Profile
To create a search profile, we have to generate the search query that will be used by it. As we saw in the previous sections, the query is created using the OSF Query Builder. Then you have to save it using that same Query Builder. Once the search profile is saved, it will appear in the list of available search profiles as we will discover in the section below.

Creating & Configuring a Search Profile Block
The see the list of all available search profile, you have to click the top menu item. Then you have the click the  link under the   section. The  page does list all the search profiles you saved using the OSF Query Builder. From that page, you can create new search profiles using the  link. This link will redirect you to the OSF Query Builder page.

If you click the  link of one of the search profile, you will be be able to edit some information about that search profile. There are three main pieces of information in a search profile:
 * 1) This is the name of the search profile that appears in the Drupal user interfaces
 * 2) This is the description of the search profile
 * 3) This is the JSON object of the Search query that as been generated by the Query Builder. You can change that query directly in that box. But take care of what you are doing since it could break the search query.
 * 1) This is the description of the search profile
 * 2) This is the JSON object of the Search query that as been generated by the Query Builder. You can change that query directly in that box. But take care of what you are doing since it could break the search query.
 * 1) This is the JSON object of the Search query that as been generated by the Query Builder. You can change that query directly in that box. But take care of what you are doing since it could break the search query.

Positioning the Search Profile Block
Now that we have created a search profile, the last step is to add this search profile to a block, and then to position that block on the Drupal portal. To add a search profile as a block, you have to click the  top menu item. Then you have to click the  link. Then you have to click the. This will will redirect you to the page that you will use to configure how the search profile will be embeded in a new block. This page will let you create a new block that will embed a search profile. There are several settings that can be configured to make sure the search profile block behave as expected. Here are the different setting options that are available to you: Once you are done configuring the new search profile block, you can click the  button to save that new search profile block. Then you will be redirected to the list of available blocks of the portal. You can position the new block using the positioning drop-down box. Once you positioned the block, it will re-appear in the section you selected. At that point, you have to make sure to save that new positioning by clicking the  button. Finally, if you got to a Drupal page where the block should appear, you will see it appearing and displaying the results of the search query:
 * 1) This is unique Drupal identifier. It should be defined using alpha numeric characters and underscores
 * 2) This is the description of the block that will be created
 * 3) This is the title of the block that will be created
 * 4) This is the search profile you want to embed in that block. The search profiles listed in that list are the ones that have been created and saved by the OSF QueryBuilder module
 * 5) If this option is checked, it means that the block will try to use the context where the block was positioned to generate the search keywords. Here are the steps that will be performed
 * 6) Will check if topics are related to the page where the block appears. Topics can be added using the   hook.
 * 7) If there are more than one topic, they will be  ed
 * 8) If no topics are found, then the title of the page will be used as the search keywords
 * 9) This is the number of results to return in the block
 * 10) Two output types are possible:
 * 11) With this option, the results will be displayed as a list of links within the block
 * 12) With this option, the results will be fully themed search results. Also, if filter blocks are defined for the OSF Search API module, then they will appear in the page as well except if their blocks have been configured such that they doesn't appear on these specific pages
 * 13) This is an option search keyword that you can define for the query. This is optional and can remain blank
 * 14) Specifies if you want to hide the block if no results were found
 * 15) These are the block settings that let you position the block in the portal
 * 16) These are the normal block visibility settings that you can use to make the block visible in different places on the portal and to different users
 * 1) Two output types are possible:
 * 2) With this option, the results will be displayed as a list of links within the block
 * 3) With this option, the results will be fully themed search results. Also, if filter blocks are defined for the OSF Search API module, then they will appear in the page as well except if their blocks have been configured such that they doesn't appear on these specific pages
 * 4) This is an option search keyword that you can define for the query. This is optional and can remain blank
 * 5) Specifies if you want to hide the block if no results were found
 * 6) These are the block settings that let you position the block in the portal
 * 7) These are the normal block visibility settings that you can use to make the block visible in different places on the portal and to different users
 * 1) This is an option search keyword that you can define for the query. This is optional and can remain blank
 * 2) Specifies if you want to hide the block if no results were found
 * 3) These are the block settings that let you position the block in the portal
 * 4) These are the normal block visibility settings that you can use to make the block visible in different places on the portal and to different users
 * 1) These are the block settings that let you position the block in the portal
 * 2) These are the normal block visibility settings that you can use to make the block visible in different places on the portal and to different users
 * 1) These are the normal block visibility settings that you can use to make the block visible in different places on the portal and to different users