Tokens are small bits of code that let you integrate LightCMS's dynamic content management functionality with your website designs.  This section provides detailed information about our tokens and how to utilize them.

Search

Token
<$search/$> 
PurposeThis token outputs a search form that allows the user to enter a search term and click a button to search your site for content.  Matches are displayed on an automatically generated search results page using the default template selected for your website.  Simply add this token to your templates and full search functionality is implemented on your site.
Attributes
  • buttonText=  specifies the text that appears on the submit button for your search form.
  • labelText=  specifies the text that appears as a label for the input field on your search form.
  • initialText= specifies the text that appears by default inside the search field on your search form. This text disappears if the user clicks into the search field and reappears if they move away from the search box without entering any text.
  • target=determines which types of items are being searched. The value is a comma separated list. For example blog, calendar, store
  • displayAdditionalInfo=True or False value that determines if additional information is included on search results page. Default value = True if not specified.

    When the target is store and this attribute = True, the search results page includes the default item image and price range.

    When the target is calendar and this attribute = True, the search results page includes the date of the event.
CSS
The search form output is wrapped in a <div> tag with the class of "search". The labelText is rendered as a <span>, the text <input> is classed as "searchInput", and the submit button <input> is classed as "searchButton".
Example Usage
Use this token to create a search form on your site:

 <$search buttonText="Click to Search" labelText="Search this Website" initialText="Type your search terms here ..." /$>