displaynextprevious
Date: 11-12-2008 15:26 Views: 2147 Author: Colin Polonowski
This function extracts the next and previous content IDs from the database based on the current content item. It takes an advanced index as the key parameter to ensure that the ordering of the content matches that of the main overall index.
There are three template parameters - they are all optional as the function also places the information of the next and previous pieces of content it the main content array so it can be accessed independently of this function.
This function accepts the following parameters:
- AdvancedIndex (required)
- JointTemplate - a template to display both links in
- NextTemplate - the template to display the next link in
- PreviousTemplate - the template to display the previous link in
This function adds the following content to the main content array for use globally:
- current_id
- current_title
- current_index_title
- current_definition_id
- current_definition_name
- next_id
- next_title
- next_index_title
- next_definition_id
- next_definition_name
- previous_id
- previous_title
- previous_index_title
- previous_definition_id
- previous_definition_name
Example valid syntax:
- (displaynextprevious|NewsIndex|JointLinkTemplate)
Displays both the next and previous links in the JointLinkTemplate - (displaynextprevious|NewsIndex||NextTemplate|PreviousTemplate)
Displays the next link in the NextTemplate and the previous link in the PreviousTemplate - (displaynextprevious|NewsIndex)
Displays no templates, but adds the above content elements to the main content array for use with standard MonkeyCMS layout functions. If used in this manner, it is recommended that is the first line within the Content Template
Please note - this function is only available in MonkeyCMS Version 1.3.8 and above

