Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Feature request: better implementation of section model

#1242

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()

Reported by dleffler · December 2nd, 2014 @ 04:11 PM

State: resolved
Milestone: 2.3.4
Assigned to: dleffler dleffler

Activity

  1. expNinja
    expNinja
    • State changed from new to resolved

    (from [09030bca87f6aadfbf931e2eba385aa33a92e7ff]) Feature request: better implementation of section model [#1242 state:resolved] https://github.com/exponentcms/exponent-cms/commit/09030bca87f6aadf...

    March 9th, 2015 @ 06:19 PM

  2. expNinja

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.