Neighbor Links Navigation: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
(Created page with "==Retrieve neighboring record ids== * Add a <code>get_neighbor_links()</code> routine for the content filtering class. ** Runs SQL to fetch the id's what should be the adjacen...")
 
 
Line 10: Line 10:
</syntaxhighlight>
</syntaxhighlight>
* Within the include the content object is referred to as <code>$input</code>.  
* Within the include the content object is referred to as <code>$input</code>.  
* Properties of the content filtering class accessed within the content include
** <code>prev_id</code>
** <code>next_id</code>
** <code>site_section->name->value</code>
* The id of the adjacent pages is passed in the <code>id</code> query string parameter.
[[Category:CMS Documentation]]
[[Category:CMS Documentation]]

Latest revision as of 14:16, 28 March 2012

Retrieve neighboring record ids[edit]

  • Add a get_neighbor_links() routine for the content filtering class.
    • Runs SQL to fetch the id's what should be the adjacent records in the sequence.
    • Must take into account current filters.
    • Neighbor id's are stored in the content filtering class's prev_id and next_id properties.

Links content include[edit]

include (COMMON_TEMPLATE_DIR."framework/navigation/neighbor_links.php");
  • Within the include the content object is referred to as $input.
  • Properties of the content filtering class accessed within the content include
    • prev_id
    • next_id
    • site_section->name->value
  • The id of the adjacent pages is passed in the id query string parameter.