diff --git a/public/js/components/Cis/Menu.js b/public/js/components/Cis/Menu.js index 9608bc9de..1fd5fce96 100755 --- a/public/js/components/Cis/Menu.js +++ b/public/js/components/Cis/Menu.js @@ -24,6 +24,11 @@ export default { urlMatchRankings:[], }; }, + provide(){ + return{ + makeParentContentActive: this.makeParentContentActive, + } + }, computed:{ highestMatchingUrlCount(){ // gets the hightest ranking inside the array @@ -38,6 +43,15 @@ export default { }, }, methods:{ + makeParentContentActive(content_id, collection=this.entries, parent=null){ + for(let entry of collection){ + if(entry.content_id == content_id){ + this.activeEntry = parent; + } + this.makeParentContentActive(content_id, entry.childs, entry.content_id); + } + + }, addUrlCount(count){ this.urlMatchRankings.push(count); }, @@ -51,8 +65,8 @@ export default { }, template: /*html*/`