diff --git a/javascript/CMSMain.js b/javascript/CMSMain.js index 8fee40fd..542753d5 100644 --- a/javascript/CMSMain.js +++ b/javascript/CMSMain.js @@ -3,6 +3,21 @@ */ (function($) { $.entwine('ss', function($){ + + $('#pages-controller-cms-content').entwine({ + /** + * we need to check if the current url contains a sub url 'listchildren' and + * assign a cookie accordingly so the default selected tab is defined on initail + */ + redrawTabs: function() { + if(window.location.href.match(/listchildren/)){ + this.rewriteHashlinks(); + this.tabs({ selected: 1 }); + }else{ + this._super(); + } + } + }); /** * Class: #Form_SearchForm diff --git a/templates/Includes/CMSPagesController_Content.ss b/templates/Includes/CMSPagesController_Content.ss index e5ada14e..ccae9289 100644 --- a/templates/Includes/CMSPagesController_Content.ss +++ b/templates/Includes/CMSPagesController_Content.ss @@ -1,4 +1,4 @@ -
+