Expand my Community achievements bar.

To disable the OmniSearch button

Avatar

Level 1

Hello there, I am new for Customization of AEM Touch Ui, At this time, I wanna Disable the "OmniSearchButton" that is found on the Site and Asset Toolbar.

thanks for your support

Abeje

3 Replies

Avatar

Employee Advisor

Omnisearch button is enabled from the following location:

/libs/granite/ui/content/shell/header/actions/search

So, you can overlay the actions node and delete the search node from that overlay.

Quick way to test is remove the search node from "/libs/granite/ui/content/shell/header/actions" but make sure you create a package of the node structure before deleteing the node and reinstall the package after testing as deleting nodes from libs directory is not recommended.

Avatar

Community Advisor

I would not recommed deleting any node. Instead use Sling Resource Merger, The node and its children are defined in /libs, but not required in the /apps overlay/override.

  1. Create the corresponding node under /apps
  2. Create a property sling:hideResource
    • type: Boolean
    • value:  true

so add sling:hideResource in /apps/granite/ui/content/shell/header/actions/search

More info at Using the Sling Resource Merger in AEM

Properties

The resource merger provides the following properties:

  • sling:hideProperties (String or String[])
    Specifies the property, or list of properties, to hide.
    The wildcard * hides all.
  • sling:hideResource (Boolean)
    Indicates whether the resources should be completely hidden, including its children.
  • sling:hideChildren (String or String[])
    Contains the child node, or list of child nodes, to hide. The properties of the node will be maintained.
    The wildcard * hides all.
  • sling:orderBefore (String)
    Contains the name of the sibling node that the current node should be positioned in front of.

These properties affect how the corresponding/original resources/properties (from /libs) are used by the overlay/override (often in /apps).



Arun Patidar