This forum is for assistance with theme development.

How do I remove span tag from node title markup?

In my olivero subtheme (d10)

at node--teaser.html.twig I have

  {% block title %}
    {% if label and not page %}
      <h2{{ title_attributes.addClass('node__title', 'teaser__title') }}>
        <a href="{{ url }}"  title="{{ node.label }}" rel="bookmark">{{ label }}</a>
      </h2>
    {% endif %}
  {% endblock %}

This worked fine in drupal 8-9 but now it outputs

Menu not appearing on the front page

Hello

I am having difficulties setting my menu links. I added a few links on the main navigation menu. They have been enabled and linked to the front page. However, I don't see them on the front page. Can anyone please help? Thank you.

Subtheme Olivero

Hello,

I have installed a Drupal 10 with the Olivero theme. I was going to modify the CSS directly on the theme but then when I download updates I will lose the changes.

To avoid losing these changes I have created a subtheme but it does not inherit the CSS from the original theme and I only want to make some color adjustments, etc...

What do you recommend I do? Would it be better to use another theme with a subtheme generator? Which one? The website is a simple personal blog without too much functionality.

Thank you very much

Sub-theme file path names when viewing the source?

After creating a sub-theme, and viewing the page source, are file paths still inherited from the parent, or do they use the name of your sub-theme?

For example, if the parent theme is named "silly-name", and you created a sub-theme named "better-name", are all the links all based on the sub-theme (A) or would they be a mix of the sub and parent (B)?

Example A (custom)

../themes/contrib/better-name/

Example B (mixed)

../themes/contrib/better-name/ and ../themes/contrib/silly-name/

[solved] image url token in twig?

Hi.

Not sure if it is the correct section here… if not, please move or advise…

I want to have a video poster in the file > video field. I have not yet been able to find a practicable solution. So i thought i can do this by simply adding the url for the poster image inside the <video> tag. But i don't know how to get the url value as a token working in twig. I am also not sure if the image would be from the actual node. Maybe this apporach is not even working.

Suddenly variables in page-html.html.twig are empty???

This is on a Drupal 10 site, and I guess that a Drupal or module update went wrong?

Suddenly the variables in page-html.html.twig are empty for taxonomy pages.

Symptom: the taxonomy page title is not displayed.

This happens with an existing starterkit theme, but also with a brand new one created with

php php core/scripts/drupal generate-theme --name TestVarSetting --path themes/custom/ -n TestVarSetting

Pages

Subscribe with RSS Subscribe to RSS - Theme development