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

id in template hero.html.twig #191

Open
backit opened this issue Oct 13, 2022 · 2 comments
Open

id in template hero.html.twig #191

backit opened this issue Oct 13, 2022 · 2 comments
Assignees

Comments

@backit
Copy link

backit commented Oct 13, 2022

Hi, i'm not sure if this is a bug or a "works as expected", but in hero.html.twig template the {{ id }} variable seems wrong because in html rendered code id is always empty. Shouldn't be {{ page.header.id }} ?

@pmoreno-rodriguez
Copy link
Collaborator

I thought about putting the name of the menu of the page that contains the hero in the id, to keep the consistency with the modular template that assigns the name of the page to the menu of each module.
The final code will look like this:

<section id="{{ page.menu|hyphenize }}" class="section modular-hero hero {{ page.header.hero_classes }} {{ page.header.background.parallax ? 'parallax' : '' }}" {% if hero_image %}style="background-image: url('{{ hero_image.url }}');"{% endif %}>

@pmoreno-rodriguez
Copy link
Collaborator

Hi @rhukster , I've seen that you've released a new version of the theme with the latest changes I made. I noticed that it's not integrated, and I'm wondering why. The Hero section ID always returns an empty value; it's not defined anywhere. The fix I included in the previous review (id="{{ page.menu|hyphenize }}") at least returns a value that matches the menu text the user selects for this section. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants