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

Support for user-defined fields in "st_CachedMenu" tag

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.3
    • Fix Version/s: 5.3.0-B1
    • Component/s: CMS
    • Labels:
      None
    • Additional information:
      Hide

      Also need to reset menu cache, when either of these new fields will be changed in a category record.

      Show
      Also need to reset menu cache, when either of these new fields will be changed in a category record.
    • Change Log Group:
      Added
    • Change Log Message:
      Adds ability to display arbitrary category fields inside a menu element.
    • Story Points:
      1
    • External issue ID:
      1400
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      Right now we have nice <inp2:st_CachedMenu .../> tag, that prints every menu on website without doing a database query.
      This works good, however in some projects I came across situations where a new database field (e.g. extra css class name) was added to a page (category) and this field needs to be used during menu printing.

      This requires to override 2 methods in MenuHelper class.

      I'm proposing to create an array (as a property of MenuHelper class), where mapping is created between Categories database table fields and parameter names, used to retrieve their values from template.

      Here is an example array:

      Array (
      	'parent_path' => 'ParentPath',
      	'icon' => Array ('Icon', 'resize:100x100'),
      );
      

      Then these parameters would be used with GetField method.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
                Reviewer:
                Gleb Sinkovskiy [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4m
                  4m