Drupal 8 Theming - Part 09 - Introduction to Views

preview_player
Показать описание
In this Drupal 8 Theming tutorial we are going to create dummy content using Devel module and display it on our front page using Views.

Views is one of the most powerful features of Drupal. It allows us to create custom queries on our content and display it on our pages or blocks.

In this episode we are first going to create dummy content using Devel module and then we are going to display it on our front page using Views.

And I can tell you right away, we are not going to like how that looks so we are going turn to Views once again and with a bit of help from css display our content just the way we like it :).

Devel module:

Code used in this tutorial:

Рекомендации по теме
Комментарии
Автор

you are the best drupal teacher i've seen, thanks

newline-u
Автор

The part on gulp was a moment of suffering for me, but since then it's been just happiness :)!

yorikmoreau
Автор

Could you do a tutorial to show us how to create a homepage slideshow using views in Drupal 8?

TheYoosuf
Автор

18:55 Don't forget that you need gulp "watching" for this change in the _homepage.scss (sass) to get compiled on the fly into css/style.css. This caught me out for a few minutes until I remembered to run "gulp watch" again.

NickHope
Автор

How better/worse is to theme a URL using a route "/post-list" and theming only one custom Twig template Eg. "post-list.html.twig" that receives a variable that contains a data object "\Drupal::httpClient()" call of a Views RESTful Display. So we have all theming in one custom template, instead of theming multiple templates for each partial that considering a big project, we could have more than 20 views and 60 templates. We'd use "conditional" and "looping" options of twig to reuse markup and print all nodes of the View RESTful Display.

I think it is an intuitive workflow that makes development faster, the only "cons" that comes to my mind could be a performance issue since we do a "http_request / parsing the JSON" instead of directing using the php object as the result of the View query. The good side I see is that it is a local request, to the same server.

Have you done performance testing "ab" to see if it implies a sustancia performance lack? What do you think?

franciscogaxiola
Автор

Thank you for your knowledgeable videos and I am learning a lot from your tutorials. I am developing a custom theme in Drupal. I have added jquery in dependencies of themename.libraries.yml file. But when site created there jquery.min.js was added. Please help me to add jquery.js.

vigneshks
Автор

Hi, I am using Drupal to build a eCommerce website for this company.  I have created a view to be viewed for the products for the customers, but for some reason when I pull up the website and click on the page link all I get is a blank page with the theme I purchased.  The Page View doesn't seem to want to display, but when I am logged in as an administrator I can see the page view just fine by clicking on the link.  Can anyone help me and explain why this is happening and how to fix it?

andregreen
Автор

When I choose tar.gz file to install Devel module and click on install button then it redirect to, this page asked me ''To continue, provide your connection details' and show a form for FTP Connection setting. I am working on local machine.
What I do to solve this ?

sandeepkumarjangra
Автор

When I try to generate content it says "unexpected error occurred" can anybody help me? I'm using Drupal 9

cracktja
Автор

I have an error when I tried to install Devel module, It linked me to a "page not found" when I upload my file .zip or tar.gz. Can you give some clue about what it could be?

wsenfurecido
welcome to shbcf.ru