This forum is for assistance with theme development.

Content Type only showing the content without header and footer.

When I add content in a new content type which I created only the content is showing not the header and footer but for the page, I have put code which is common should be rendered in every page I put header and footer code in page.html.twig if I add new page then header and footer comes but its not coming in node, but I think I'm missing something what should I do

Include javascript but on run onpage load not when ajax is run?

Hi

I have added js to my theme,

Drupal.behaviors.exampleTheme = {
  attach: function (context, settings) {
    $('.example', context).click(function () {
      $(this).next('ul').toggle('show');
    });
  }
};

The js is run everytime ajax is called.

What would I need to do to only make this work on page load and not everytime ajax is called?

How to render paragraph in content type

I have created a content type called Repeat(node--repeat.html.twig) I want to render paragraph type fields in node--repeat.html.twig so I placed <div> in which paragraph is rendered and then I added paragraph field in content type which I have created but the content type is showing empty.paragraph is not rendering nor it's showing in inspect element. But instead of a paragraph if I add  one or more fields those are rendering correctly

this is the code

<div class="container py-5 pb-5 mx-auto">

      <div class="row row-cols-1 row-cols-md-3 g-4">

How to render dropdown menu

I created menu without the child with this  code it rendered correctly with my css -->

<ul class="navbar-nav me-auto mb-2 mb-lg-0">

    {% for item in items %}

    <li class="nav-item">

       <a class="nav-link  " href="{{ item.url  }}">{{    item.title }}</a>

    </li>

    {% endfor %}

    </ul>

Separate balise hr?

Hi :)

I would like put balise hr between Field for a Content, but how is the best proceed?

With Layer Builder I try but no works....

Thx.

How to Login as admin for custom theme

I've created a custom theme(bootstrap as contrib)

Pages

Subscribe with RSS Subscribe to RSS - Theme development