Quantcast
Channel: Experiencing Adobe Experience Manager (AEM, CQ)
Viewing all articles
Browse latest Browse all 525

AEM CQ 56 - Extending SiteAdmin to show Search tab on login

$
0
0

Goal


When a user logs into siteadmin console http://localhost:4502/siteadmin, the Websites tab is shown. Here we need the Search tab to be shown by default and not Websites



Solution


1) Use the overlay architecture of CQ and extend SiteAdmin actions. So login to CRXDE Lite (http://localhost:4502/crx/de) and create file /apps/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js to overlay /libs/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js

2) Add the following code in js /apps/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js

Here we execute ootb SiteActions js before executing the script to activate Search tab

$.getScript("/libs/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js", function(){
var interval = setInterval(function(){
var comp = CQ.Ext.getCmp("cq-siteadmin-tabpanel");

if(comp){
comp.setActiveTab(1);
clearInterval(interval);
}
}, 500);
});


Viewing all articles
Browse latest Browse all 525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>