Add a RapidSearch form to your RapidWeaver website
What is RapidSearch?
RapidSearch is the easiest way to add powerful Google™ search to any RapidWeaver website. RapidSearch is a RapidWeaver plugin that allows you to search for web pages, images, blog entries, and news articles from your own website or from an unlimited number of other websites. Search results are displayed immediately on your own website with your own branding.
For many RapidWeaver users, however, having a dedicated search page is not sufficient. This tutorial demonstrates how to add a RapidSearch form to your RapidWeaver website’s header, sidebar, or footer so that your website’s visitors can quickly and easily search your RapidWeaver website from any page.
Prerequisites
This tutorial assumes you have purchased RapidSearch and have added a RapidSearch page to your RapidWeaver website.
The HTML markup
First thing’s first. Here is the HTML you will need to add the search form to your RapidWeaver website. It is extremely important that you change the form’s action attribute in the following markup so that it points to your RapidSearch page using a relative or absolute URL. This markup will not work if the form’s action attribute does not point to your RapidSearch page.
<form action="http://your_website.com/path/to/your/RapidSearch/page.html" method="get">
<fieldset>
<input type="text" name="query" value=""/>
<input type="submit" value="Search"/>
</fieldset>
</form>
Add the search form
With ExtraContent
Follow these directions only if your RapidWeaver theme supports ExtraContent. Many RapidWeaver themes support ExtraContent, a feature that enables you to inject custom HTML in various locations of your website’s layout, such as the header, sidebar, or footer. These locations vary from theme to theme, so you should consult your theme’s documentation before you choose an ExtraContent location.
- Open your website file in RapidWeaver
- Select a page that should display the search form
- Open the Page Inspector → Sidebar panel
After you open the Page Inspector → Sidebar panel, copy and paste the following markup into the Sidebar panel; ensure you apply Main Menu → Format → Ignore Formatting to the pasted code if your sidebar is using Styled Text formatting rather than HTML formatting. You may need to change the myExtraContent1 ID attribute of the ExtraContent container in the markup below, depending on the ExtraContent container you choose. For example, you may change the ID attribute to myExtraContent2 or myExtraContent3. Refer to your theme’s documentation for more information about the ExtraContent containers available in your theme. Also, be sure you change the form’s action attribute as I mentioned above.
<div id="myExtraContent1">
<form action="/path/to/your/RapidSearch/page.html" method="get">
<fieldset>
<input type="text" name="query" value=""/>
<input type="submit" value="Search"/>
</fieldset>
</form>
</div>

Without ExtraContent
Follow these directions only if your RapidWeaver theme does not support ExtraContent.
- Open your website file in RapidWeaver
- Select a page that should display the search form
- Open the Page Inspector → Sidebar panel
After you open the Page Inspector → Sidebar panel, copy and paste the following markup into the Sidebar panel; ensure you apply Main Menu → Format → Ignore Formatting to the pasted code if your sidebar is using Styled Text formatting rather than HTML formatting. Without ExtraContent, this RapidSearch form can only be added to your RapidWeaver website’s sidebar.
<form action="/path/to/your/RapidSearch/page.html" method="get">
<fieldset>
<input type="text" name="query" value=""/>
<input type="submit" value="Search"/>
</fieldset>
</form>

Search your website
You will need to publish your RapidWeaver website before the new search form will work. After you publish your RapidWeaver website, open your published website in a web browser. View a page that uses the new RapidSearch form, enter a keyword in the search form, and click “Search”. Assuming you correctly changed the form’s action attribute, you will be directed to the RapidSearch page and shown a list of search results. Congratulations! Your website’s visitors can now search your website from any page — not just the dedicated RapidSearch page.