AEM 6 SP2 - Touch UI Site Admin Console Default to List View

Goal


When a user accesses Sites Admin console first time (http://localhost:4502/sites.html) the results are shown as cards by default (user can then select choice of view, stored in cookie cq.sites.childpages.layoutId for any future requests). This post is on setting the default view to List

Demo | Package Install

               List View



Solution


1) Create overlay of /libs/wcm/core/content/sites/jcr:content/body/content/content/items/childpages/layout in /apps. Use overlay creator helper servlet for creating the structure in /apps

2) Add a property layout on /apps/wcm/core/content/sites/jcr:content/body/content/content/items/childpages/layout with the following value (when cookie cq.sites.childpages.layoutId is null, select view type as list)

${state["cq.sites.childpages.layoutId"].string == null ? "list" : state["cq.sites.childpages.layoutId"].string}

An other way to select default view is by reordering the view nodes under /libs/wcm/core/content/sites/jcr:content/body/content/content/items/childpages/layout/layouts in /apps overlay



No comments:

Post a Comment