This forum is for assistance with theme development.

Programmatically display a form in a theme region

Hi,

I am trying to display a form programmatically in a theme region. I am trying to select the sidebar_second to render my form. So in my custom twig template I use code like:

{% if page.sidebar_second %}
      // Display custom form here
{% endif %}

But it wont show anything. However, if I remove the condition the form gets displayed in the content region. 

How do I select the sidebar_second region in my custom twig file? Please let me know.

Menu hamburger doesn't work

I am making a website on Bootstrap 3 subtheme. Unfortunately, the hamburger menu does't work. When scaling the page, the traditional menu disappears and the hamburger menu appears. The menu hamburger lights up when I move the cursor over it, but when I click on it nothing happens. When I switch to Bootstrap theme the hamburger menu works properly. What could be the reason? I deleted all css to check if something in my code is the cause, but it also doesn't work.


Twig saves not changing on local live reload?

Maybe I'm not phrasing that right. I'm very new to D8, but have a lot of experience with D7. I've got a local dev environment running off a Pantheon install. I'm using Codekit, MAMP and VSC... which I've been running D7 on for quite a while. 

I can get Sass compiles to refresh on the live reload (no cacheing), but when I save a twig file I have to push it to the pantheon server and flush caches to get it to refresh the source code locally.

I'm obviously missing something in one of my theme files, or somewhere in sites/default. Can anyone lend some insight?

How to display a text if the product belongs to a store of defined type ?

I have a Drupal 8 site with Drupal Commerce 2

I have a template for my product commerce-product--produit--full.html.twig

I have 2 types of store (1 and 2). I want that when the product is in a type 2 store, it displays the text "test".

If the product is in a type 1 store, it displays nothing.

How do I do this in TWIG ?

{% if ??? %}
  test
{% endif %}

Drupal 8 bootstap barrio center bannerslider howto

I have a drupal 8 version site (work on progress) and added a bannerslider in the top-header region.
and nothing in the left and right region in the top.

How can I center the Image above the side (now it is alligned left
Tried several bootstrap tricks but with no succes fo far

Google Translate changes HTML - Removes link

Hi there,

I have recently developed a website for my local council, and am having some trouble getting Google's online translate feature to work on a specific portion of it.

The website currently uses Bing translate successfully, but the business have asked to move to Google translate as my local area has a large population of people who speak languages not supported by Bing Translate.

Pages

Subscribe with RSS Subscribe to RSS - Theme development