#1242 ✓resolved
dleffler

Feature request: better implementation of section model

Reported by dleffler | December 2nd, 2014 @ 04:11 PM | in 2.3.4 (closed)

We could make much better use of the 'section' model beyond its current use to access the database for creation, selection, and deletion. Because of this we do not truly use it as a 'model' in most of the views/actions and tend to pass the entire menu/page hierarchy as an array of data. Besides we still access the global $db object from within the controller...which should be moved to within the model. The model could NOT include Ajax/JSON based methods since they must be made to the controller. Some possible model methods (which may or may not already be within the navigationController) could be:

  • getParent()
  • getTopParent()
  • getSiblings()
  • getChildren() - perhaps with params as to the depth such as all immediate children or all subordinates...of only a single depth down, etc...
  • hasChildren()
  • isTopLevel()
  • isStandAlone()
  • isPublic()
  • some of the delete/remove method now in the controller? rebuild_sectionrefs()

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Bug Tracker for Exponent CMS

Shared Ticket Bins

People watching this ticket

Tags

Pages