Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to disable defaut selection of tab in content finder?

Avatar

Level 9

Hi All,

Our application is running on AEM 6.2 and whenever we open a page from site admin, we observed one issue that page is taking a lot of time to load.We have observed one thing that whenever we open the page from site admin there is a default tab(image) gets selected and loads all the images in the content finder panel along rendering of a page.I want to deselect/disable this image tab by default.

I have identified the responsible js(/libs/cq/ui/widgets/source/widgets/wcm/ContentFinderTab.js) but not sure what changes needs to be done.

If anyone has any idea, please help me in this regard.

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi, Kishore

Now I understand your requirement. 
If you just want to change the default selection tab of content-finder, you can go here /libs/wcm/extensions/contentfinder/images.js and copy this file images.js to "/apps/wcm/extensions/contentfinder".

To do this, just create a "wcm" folder inside apps and the create two nested folders (extensions and contentfinder) of type sling:Folder as in /libs/wcm.

Copy the properties of contentfinder folder from libs to apps (extentionGroup and extentionType).

Now copy the file images.js into the contentfinder folder from libs. You can edit the value of "ranking" to the higher value to change your order of the tab. For Eg., "ranking":40. So your images tab will not be the first one on page load. This is one of the easy way as of my knowledge because we are not customizing anything except rank value of the tab. 

Hope this helps. 

View solution in original post

0 Replies

Avatar

Level 4

Hi, Kishore

To disable content finder from your page, consider to add a property named "cq:defaultView" of String type to jcr:content node of your page (/content/yoursite/page/jcr:content) and set its value to "html"

Now try to open that page and check that page will not load content-finder. 

This way you can specify which pages of your site to load content-finder and which are not. 

Also, you can add this property to your page component node.

Hope this helps! 

Avatar

Level 9

Thanks for the reply.

Actually, my requirement is content finder should come up along with the page.In the content finder by default, Image tab is selected which I do not require.It should not be selected by default with this images will not be loaded in Content Finder tab and page gets loaded bit faster.

-Kishore

Avatar

Correct answer by
Level 4

Hi, Kishore

Now I understand your requirement. 
If you just want to change the default selection tab of content-finder, you can go here /libs/wcm/extensions/contentfinder/images.js and copy this file images.js to "/apps/wcm/extensions/contentfinder".

To do this, just create a "wcm" folder inside apps and the create two nested folders (extensions and contentfinder) of type sling:Folder as in /libs/wcm.

Copy the properties of contentfinder folder from libs to apps (extentionGroup and extentionType).

Now copy the file images.js into the contentfinder folder from libs. You can edit the value of "ranking" to the higher value to change your order of the tab. For Eg., "ranking":40. So your images tab will not be the first one on page load. This is one of the easy way as of my knowledge because we are not customizing anything except rank value of the tab. 

Hope this helps. 

Avatar

Administrator

Hi, 

the solution provided by Vamsi should work.

But, i will first counter the question why do we need to prevent CF loading? are you sure CF images are causing problem in page load?

The images loaded here are not actual images they are renditions of very small size, so please do check if problem is with CF Images load or not?

Check the image load network call time for response.

~kautuk

Avatar

Level 9

hi,

The suggestion given by Vamsi has helped to fix the issue.Actually,  we have been observing performance issues.When we open page from Siteadmin page is taking a lot of time to render and further investigation we come to know that images loading in the right pan cause the page to load very slowly.

I have stopped this automatically loading of these images in the content finder this will not harm anything.Content authors can still go to Browse tab and select the images while authoring pages.

Thanks,

Kishore

Avatar

Level 9

Thanks Vamsi.

I did not change any ranking value but i overlayed and stopped showing the images by default.