callumbwhyte / meganav

A flexible, draggable link picker for constructing site navigation menus in Umbraco
MIT License
35 stars 34 forks source link

Do not store 'dynamic' data to database (name, url, icon, published, naviHide) #34

Closed ronaldbarendse closed 2 years ago

ronaldbarendse commented 5 years ago

Currently, all data used in the back office view is stored in the database, e.g.:

{
  "id": 1000,
  "name": "Home",
  "url": "/en",
  "children": [],
  "icon": "icon-umb-content",
  "published": true,
  "naviHide": false,
  "title": "Return to home"
}

This causes stale data to be shown when the linked content name, URL, publish or visibility status is changed, besides just bloating the database. The property editor should create a PropertyValueEditor that removes unnecessary data (ConvertEditorToDb()) and enriches it with current values when rendering the back office view (ConvertDbToEditor). The URL should obviously only be removed when linking to content.

callumbwhyte commented 5 years ago

Hey @ronaldbarendse!

Thanks for raising this - it's definitely something that needs doing.

I've planned this in for v1.2.0

callumbwhyte commented 2 years ago

As of Meganav V2 & V3 this is no longer the case. Thanks for raising @ronaldbarendse!