Neighbor Links Navigation

From Littledamien Wiki
Jump to navigation Jump to search

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.