This forum is for assistance with theme development.

solved: Multiple views in a block

Hi

I'm helping person who has made views with content. They work fine. On page layout is needed to add 3 different views in to same block.
Using drupal 8 latest with views,views ui

I am thinking should this be done (can be done) with twig theming or on common drupal GUI ? Via GUI i didn't find solution. If twig theming then could someone add oneline example how to call out block macro with different views macros. I see block names under block edit.

I looked at twig_tweak project and seems it should be possible..

thank you very much in advance,

Create thumbnails using php and mysql

Greethings!
I'm using a module that shows three latest news on the front page. Here is its code:

twig if Term ID is, then print something

I have a taxonomy called Fish and 2 terms in it. Bass and Gold. I have a term reference field on a Page node, and its a select list. The editor can select either Bass or Gold. And I want display something depending on what the user selects. I cannot get it to work. This is what I have tried. Below the Bass tid is '1'.

D8 and Foundation 6 - page.html.twig question [Solved}

Hello,

I am using Zurb_Foundation for Drupal 8.

My powers of CSS are so so, so please bear with me.

I am trying to get the header section of my page.html.twig to span across the whole screen and not just default width. See code section at the bottom.

To test, I copied the following snippet right below

Custom template for content type. Content in template is empty.

Hello,

I want create custom template for each content type.
I have defined mytheme_theme_suggestions_page_alter(..) and files in /templates/*.html.twig. The problem is that drupal dont load content to template.

mytheme.theme

function mytheme_theme_suggestions_page_alter(array &$suggestions, array $variables) {

  if ($node = \Drupal::routeMatch()->getParameter('node')) {
    $content_type = $node->bundle();
    $suggestions[] = "page__".$content_type;
    }
}

and files like:

javascript to twig

can i call twig file from javascript file in drupal 8?

Pages

Subscribe with RSS Subscribe to RSS - Theme development