В этом видео мы разберем как подключить jQuery Isotope плагин и сделаем фотогалерею:
https://isotope.metafizzy.co/
PSD макет:
http://drupalbook.ru/sites/default/files/blueasy-freebie.zip
Исходный код:
https://github.com/Drupalbook/bootstrap
Демо:
http://dev-blueasy.pantheonsite.io/
Статья по работе с jQuery в друпал 8:
http://drupalbook.ru/drupal/88-rabota-s-javascriptjquery-v-drupal-8-chto-takoe-behaviors
Вывести ID категории таксономии в классах, можно было и проще, прямо в шаблоне views без дополнительной препроцесс функции:
https://drupal.stackexchange.com/questions/208201/how-to-get-each-field-value-in-views-views-unformatted-view-machine-name-html-t
Переопределение шаблона views:
https://api.drupal.org/api/drupal/core%21modules%21views%21views.theme.inc/group/views_templates/8.2.x
http://www.maged.me/blog/drupal-8-override-views-field-template-twig
Комментарии
Добавить комментарий
It's a pitty I don't
It's a pitty I don't understand Russian, nevertheless I am following your vids.
I thought I would make a comment on adding classes, where you had to make a variable through preprocessing and then using that variable in the views--unformatted template. The same can be achieved easily by adding rewrites in the Unformatted|Setting.
Views says: "You may use field tokens from as per the "Replacement patterns" used in "Rewrite the output of this field" for all fields." and adding col-md-3 col-sm-4 col-xs-12 category-{{ field_gallery_category }} achieves the same result. Just easier for me not comfortable with programming.
Once again thank you for your videos, am learning through watching , cant understand what you are saying but I bet its very informative
Yes, sure you can use
Yes, sure you can use "Rewrite fields" in Views if it helps. But this video are created basically for education, to teach how to use Views in different ways. I started to work on my English blog and screencasts. So I'm planing to create new videos in English in the December.