Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EWPP-2149: Allow inpage navigation generation to support multiple instances. #1094

Merged
merged 8 commits into from
Jun 13, 2022

Conversation

brummbar
Copy link
Contributor

@brummbar brummbar commented May 7, 2022

This PR has a different approach than #1086.
The reasoning behind this rework are:

  • The above PR forces to specify where the generated items need to be added. If we have a template has very special elements that are rendered and need to act as titles (e.g. span.fw-bold), we need to somehow fetch the ID generated in the inpage content row paragraph so that we can pass it to the element. The idea behind the data-inpage-navigation-source-area was to be able to declare any template as source area, without having to do any extra steps.
  • This PR reworks the JS to be more similar to a standalone library/plugin. Aside from the name (which we cannot change if the users are referencing its old methods), all the ECL specific selectors are gone from Drupal.eclInPageNavigation.

js/inpage_navigation.js Show resolved Hide resolved
js/inpage_navigation.js Show resolved Hide resolved
sergepavle
sergepavle previously approved these changes May 19, 2022
@upchuk upchuk merged commit 0defe72 into 3.x Jun 13, 2022
@upchuk upchuk deleted the EWPP-2149v2 branch June 13, 2022 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants