Skip to content

Show title feature

By default Entity Access Password implements the following hooks in order to hide the entity label if needed:

  • hook_preprocess_html
    • For the meta title of the page.
    • If you are using Metatag, you can use the [ENTITY_TYPE:protected-label] token provided by the module.
  • hook_preprocess_page_title
    • For the page title block.
  • hook_preprocess_node
    • For the label variable of the Twig template.
  • hook_preprocess_taxonomy_term
    • For the name variable of the Twig template.

If you are using the module on another entity type, you will probably have to implement other hooks in order to apply the same logic to this entity type.

Warning: Entity label is not hidden in the breadcrumb.

As the breadcrumb can be overridden by contrib, custom modules and also themes (with breadcrumb builder services and/or hook_preprocess_breadcrumb), it is impossible to implement a generic solution.

Feel free to propose a generic solution if possible but you will probably have to make your logic into your custom code.