Free-Conversant Support / Improved Feature: Query Pages
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Page Types >> Improved Feature: Query Pages

Query Page

[NOTE: The "Query Page" type is still available mainly for backward compatibility. The Advanced Query Page is the preferred query page type now and we recommend it use for all new query pages.]

The Query (or Search) Page is a page type. So, as with any page object, it appears in the structure editor and you can set its typical page properties (like template, CSS, etc).

In additions, it has some properties of its own that allow you to define more precisely how the Query Page looks.

A Query Page has been created automatically in your site, at yourSite/query. So you may choose to skip the next section ("Creating a Query Page") for now.

Creating a Query Page

To create a new Query Page, go to the structure editor of your site: "/yourSite/admin/conversations/yourSite/structure", and select the folder in which you want to create the page.

In this folder's properties editor, scroll the window all the way down, until you get the "New File Or Folder" form. Type the name you want to give to your page in "Navigation Title". Set "Page Type" to "Query Page" and click on "Create New File".

The page will reload and show you a confirmation that the new object has been created. Locate this object in the structure listing and click on it. This will open the properties editor for your Query Page.

Editing Query Page Properties

Go to the structure editor of your site and click on your query page's name in the listing. By default it's "/yourSite/admin/conversations/yourSite/structure/$path=yourSite%2Fquery".

The Query Page has a set of common properties (like template or magicNavbar's) that we won't cover here. It has also its own properties:

  • Query Fields Width
    Define the width of the "Subject" and "Body" text fields in the query form.
  • Query Select Height
    Define the heigh of the "Posted By" select box in the query form.
  • Items Per Page
    Define the number of found messages to display in each search result.
  • Clipping Lenght
    Define the length of the "clipping" displayed for each found message.
  • "Previous" link text
    Defines the text to use for "Previous" links (you can also enter an image tag).
  • "Next" link text
    Defines the text to use for "Next" links (you can also enter an image tag).
  • Query form template
    This is the template for the query form.
  • Search result page template
    This is the template for the body of the search result.
  • Search result item template
    This is the template for each item in the body of the search result.

Macros

The three templates are set by default, but feel free to edit them as you want. Here are the macros you can use in them:

As usual, use the form <!--#macroName-->.

  • In Query Form Template:
    At the moment, all these macro calls are required in that template.
    • queryFormTag
      This will be replaced with the opening form tag.
    • queryHidden
      This will be replaced with a hidden tag that will carry internal informations.
    • queryStartDate
      This will be replaced with a text field allowing to enter the "starting date" criteria of the query.
    • queryEndDate
      This will be replaced with a text field allowing to enter the "end date" criteria of the query.
    • querySubject
      This will be replaced with a text field allowing to enter the "subject" criteria of the query (control the width of this field with the "Query Fields Width" page property).
    • queryBody
      This will be replaced with a text field allowing to enter the "body" criteria of the query (control the width of this field with the "Query Fields Width" page property).
    • queryPostedBy
      This will be replaced with a select box allowing to enter the "posted by" criteria of the query (control the height of the select box with the "Query Select Height" page property)
    • querySortedBy
      This will be replaced with a popup menu allowing to select the sort order of the result.
    • querySubmitButton
      This will be replaced with the submit button.
  • In Search Result Page Template:
    • searchResultNumLink
      This will be replaced with the "#" link in the search result's header.
    • searchResultDateLink
      This will be replaced with the "Date" link in the search result's header.
    • searchResultSubjectLink
      This will be replaced with the "Subject" link in the search result's header.
    • searchResultPostedLink
      This will be replaced with the "Posted By" link in the search result's header.
    • searchResultFoundLine
      This will be replaced with the line that indicates how many messages were found and how many are displayed.
    • searchResultPrevLink
      This will be replaced with a link to the page that displays the previous found messages. The text used to display the link can be set in the query page properties
    • searchResultNextLink
      This will be replaced with a link to the page that displays the next found messages.
    • searchResultPageLinks
      This will be replaced with a link to each page of found messages.
    • searchResultBody
      This will be replaced with the found messages, each one viewed thru the "Search Result Item Template". (Required)
  • In Search Result Item Template:
    Each message displayed in a search result passes thru this template.
    • msgNum
      This will be replaced with the number of the message (the unique msgNum identifier that each message has).
    • searchResultMsgNum
      This will be replaced with a link to the message wrapped over the number of the message.
    • searchResultMsgDate
      This will be replaced with the creation date of the message.
    • searchResultMsgSubject
      This will be replaced with the subject of the message.
    • searchResultMsgAuthorName
      This will be replaced with the author's name.
    • searchResultMsgAuthorAddress
      This will be replaced with the author's email address, (or his fake email if he/she chose to remain anonymous).
    • searchResultMsgBody
      This will be replaced with an excerpt of the message's body (whose length may be defined from a page property).
View in DG


This site managed with Conversant, © Copyright 2007 Macrobyte Resources