Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1082

Include only "Show in Menu" categories in "st_CachedMenu" tag cache

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.2.0
    • Component/s: Front End
    • Labels:

      Description

      Main difference between current In-Portal 5.x and In-Portal 4.3.9 is integrated In-Edit module.

      This allowed to have more control over CMS part of In-Portal and provided huge possibilities such as:

      • content revision tracking
      • browse mode
      • drag-n-drop support of theme elements
      • almost inline phrase editing right inside a theme

      To get that we needed to create a category for each template file in each theme, that is used on a website. We actually store ALL 4000 categories in cache (and not only these 20, which are usually in menu) to solve problem when you call st_CachedMenu tag with category_id parameter, which isn't in menu, but all it's child categories are.

      That's why we cache ALL categories and then only display ones, that have IsMenu mark.

      There might be more elegant solution, like this:
      1. get all categories, that have IsMenu (usually no much)
      2. get ParentPath of all categories, that were selected on previous set
      3. create multi-dimensional array where we'll have all IsMenu categories to be displayed grouped by their parent categories
      4. some categories will only have 1 child category because one of it's children have IsMenu categories, but category on it's own isn't displayed in menu.

      Sounds pretty interesting optimization. Would speed up menu cache building (if you have many categories) very much.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: