Free-Conversant Support / Page Macros
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Macros >> Page Macros

Page Macros are a special set of Conversant macros designed to provide access to properties of page in a Conversation's website structure, and to provide means of building navigation between sets of pages.

Available Macros


Path attribute notes:

The "path" attribute of the page macros can accept several different values. By default, if no path attribute is specified in a page macro, the current page being rendered is assumed to be the path. You may override the path value, using the path as you would enter it to bind a message to a URL, to access properties of another page in the conversation. For example, this macro would return the page title of the home page of the conversation:

<--#pageTitle path="/index"-->

The path attribute also understands several special values that are relative to the current page being rendered. These values are:

  • "next" - return the value from the next page in the parent folder's sort order
  • "prev" - return the value from the previous page in the parent folder's sort order
  • "first" - return the value from the first page in the parent folder's sort order
  • "last" - return the value from the last page in the parent folder's sort order

By using these relative properties, you can create navigation links that, for example, allow users to easily read an article that's divided into several pages by moving the "next" page. Controlling the sort order of the parent folder in the structure editor allows you control over how this sort order is constructed.

Date Formatting:

Two macros (pageCreated and pageModified) display dates. These dates can be formatted however you like, with a combination of the optional format, timezoneName, and lang attributes.

For complete details on the use of these attributes, see Working with Dates in Conversant.


<!--#pageTitle-->

Returns the title of the page as specified in the structure editor.

Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.
  • link="[true/false]" : If true, return the value linked to the page's url. Default: false.
  • urlencode="[true/false]" : If true, encode the the returned text for use in a URL. Default: false
  • entify="[true/false]" : If true, return the text with special html characters entified. Default: false


<!--#navTitle-->

Returns the navigation title of the page as specified in the structure editor.

Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.
  • link="[true/false]" : If true, return the value linked to the page's url. Default: false.
  • urlencode="[true/false]" : If true, encode the the returned text for use in a URL. Default: false
  • entify="[true/false]" : If true, return the text with special html characters entified. Default: false


<!--#pagePosition-->

Returns a number representing the index value of the page in relation to the it's parent folder sort order. For example, the first page in the sort order returns "1", the second "2", etc. Can be used in association with the #pageCount macro to create informational tag lines, like "Page 2 of 10".

Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.


<!--#pageCount-->

Returns a number representing the total number of pages in the parent folder sort order. Can be used in association with the #pagePosition macro to create informational tag lines, like "Page 2 of 10".

Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.


<!--#pageType-->

Returns the page type of the page, ie, "Bound Message", "Advanced Query Page", etc.
Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.
  • urlencode="[true/false]" : If true, encode the the returned text for use in a URL. Default: false
  • entify="[true/false]" : If true, return the text with special html characters entified. Default: false


<!--#pageURL-->

Returns the URL to the page.
Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.


<!--#pagePath-->

Returns the path to the page.
Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.


<!--#nextPageLink-->

Builds a link to the next page in the parent folder's sort order.
Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.
  • text="[string]" : Text to use in the link. Default: "Next".
  • nolinktext="[string]" : Text to return if no valid "next page" exists. Default: "Next".


<!--#prevPageLink-->

Builds a link to the previous page in the parent folder's sort order.
Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.
  • text="[string]" : Text to use in the link. Default: "Previous".
  • nolinktext="[string]" : Text to return if no valid "previous page" exists. Default: "Previous".


<!--#firstPageLink-->

Builds a link to the first page in the parent folder's sort order.
Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.
  • text="[string]" : Text to use in the link. Default: "First".
  • nolinktext="[string]" : Text to return if the current page is the first page. Default: "First".


<!--#lastPageLink-->

Builds a link to the last page in the parent folder's sort order.
Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.
  • text="[string]" : Text to use in the link. Default: "Last".
  • nolinktext="[string]" : Text to return if the current page is the last page. Default: "Last".


<!--#pageCreated-->

Display the creation date and/or time of the specified page.
Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.
  • format="[date/time format string]" : See Date Formatting Notes above for details.
  • timezoneName="[name of the timezone]" : Displayable name of the timezone. Only used if the specified format includes the timezone.
  • lang="[language code]" : A supported language code for date formatting. See Date Formatting Notes above for details.


<!--#pageModified-->

Display the modification date and/or time of the specified page.
Optional Attributes:
  • path="[pathToFile/special value]" : See Path Notes above for details.
  • format="[date/time format string]" : See Date Formatting Notes above for details.
  • timezoneName="[name of the timezone]" : Displayable name of the timezone. Only used if the specified format includes the timezone.
  • lang="[language code]" : A supported language code for date formatting. See Date Formatting Notes above for details.
View in DG