Allow modules to prevent certain Contextual links from being render

Created on 21 February 2019, over 5 years ago
Updated 15 May 2023, about 1 year ago

Problem/Motivation

follow up #3002608: Remove contextual links not related to layout administration inside layout builder blocks β†’

In that issue we didn't want contextual links to be rendered inside elements that were in the Layout Builder to avoid the user thinking they were related to layouts and being rerouted from the page.

We were only able to do this by responding to the Javascript event drupalContextualLinkAdded and then removing the new link.

Although this works well it may cause unneeded requests to the server if the contextual links are not cached at that point on the client. If there was a way to prevent the contextual module from even adding the link this might be better.

But to be clear contextual links are cached in the clients browser local storage(which for clearing is sometimes maddening) so in most cases there will not actually be a server call. It could though also save Javascript resources.

Proposed resolution

Determine if need a way to do this or if the way Layout Builder did this is fine

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Closed: outdated

Version

10.1 ✨

Component
ContextualΒ  β†’

Last updated 6 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024