Latest posts

Browse topics

Floating Block for Drupal 8

The Floating block is a nice helper module which allows you to keep HTML blocks, selected using jquery selectors in a fixed position on the page as you scroll. I've been using Floating block mostly for my personal blog to feature related content (you can see floating module while browsing this web page from a desktop computer.)

In fact, I stop using floating block module  a couple of years ago, but recently I was contacted by another Drupal webmaster, regarding my tutorial on Floating Block module for Drupal 7 site and taking a fresh look at this module, I understood - Floating block module helps UI by filling up sidebar, so it's never empty. 

When speaking about Floating block module for Drupal 8, there is not yet a stable release (as of writing this), but there is a dev version, which actually works out of the box.

Configure Floating Blocks for Drupal 8 website

As usual, let's start with download

  • Download and enable floating block module
  • Configure floating block from admin/config/user-interface/floating-block

In my example, I'm looking to make one block from the right sidebar to float.

Using inspector tool (Chrome CTRL+Shitf+I) find div (#) id element you are looking to make floating, in my case: #block-views-block-tours-block-2

To float the left sidebar within a container in your theme us selectors, for bootstrap: container=.main-container

Here is complete configuration for floating block configuration

#block-views-block-tours-block-2|container=.main-container

Feel free to drop a comment if you need any help.

Views Infinite Scroll / Load more with Ajax for Drupal 8

As you might guess from the title already, in today's Drupal tutorial I will write about how to configure infinite scroll/load more button for Drupal 8 website. The best - both behaviors can be achieved using just one module - Views Infinite Scroll

Check out following tutorials for Drupal 7: Drupal masonry front page, Views lode more pager with Ajax for Drupal

And again, as in the previous tutorials, you can find a live preview on Tourgeorgia.eu

  • Download and enable Views Infinite Scroll module
  • Visit views page, you would like to attach infinite scroll or load more function
  • Change Pager: Infinite scroll, I will use 10 items to load on default

Pager settings for Infinite scroll

Pager settings for Infinite scroll

Now in order to make it work with Ajax, let's turn on Ajax:

  • Under Advanced - > Other: Use AJAX: Yes

Almost there, but here are few things we should fine tune here

Settings for Infinite Scroll

Under Pager (use pager) click on Infinite Scroll Options and check next to the Automatically load Content

Automatically load Content

Automatically load Content

Settings for Load more 

Repeat the same steps as for infinite scroll, just make sure to uncheck Automatically load Content

Here you go - a really easy way to setup both infinite scroll or load more pager with Ajax.

Load more button with Ajax for Drupal 8 website

Load more button with Ajax for Drupal 8 website

Optionally 

CSS code to make load more button 100% width (for Bootstrap powered template}

.pager li > a, .pager li > span {
    display: inline-block;
    padding: 5px 14px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0px;
    width: 100%;
}

CSS bug wit custom views-row classes (first, last) in Drupal 8

Seems there is a bug with Drupal 8 views, when trying to render classes for views-row. There exist some workarounds, but right I find them secondary and I'm ready to wait until it will be solved with next views updates.

How To Enable Custom Google Fonts For Drupal 8 Website

There are several options how to enable custom fonts for Drupal 8 website, in this article I will stick with one of the easiest - using a custom module - @font-your-face

As usual, for this Drupal tutorial I will use a real-time scenario: For Tourgeorgia.eu website I'm using custom Premium theme adapted for Drupal 8, at one stage I noticed that example theme looks better than customized, and then I realized we are missing few fonts, which must be loaded manually.

As, said there are several options to handle this, but this time I decided to use a module. Again, there are two scenarios possible, either you are building Drupal theme from scratch and writing custom .css style or you are using a readily built theme. As in this case, I'm using the ready built theme, I won't touch .css part, as code already have been written.

  • Download and enable @font-your-face module
  • As for this case I'm using Google Fonts, enable Google Fonts module
  • Go to admin/appearance/font and enable custom fonts you need
  • Flush cache and enjoy result

Custom fonts enabled

Custom fonts enabled

Matsoni House

Matsoni is a Georgian fermented milk product, kind of similar to yogurt. Made from cow’s milk. Now, there is even a Matsoni House, where some (probably you) can try this product served with honey or nuts and so on. There is even an ice cream made from Matsoni. 

Matsoni house is located just opposite to the Alaverdi Monastery, in the region of Kakheti, Georgia.

Matsoni house near Alaverdi monastery

Matsoni house near Alaverdi monastery

If you are visiting the Alaverdi Monastery, it' s hard to miss this lovely place, located just opposite the cathedral. Smart.

Matsoni with honey and walnuts

Matsoni with honey and walnuts

Ice cream from Matsoni

Ice cream from Matsoni

Delicious.!

Grape Harvest Rtveli in Georgia (Region of Kakheti)

If there is the best time to visit lovely Georgia, I would highly recommend to visit it in September, during the grape harvest time, or Rtveli. 

Rtveli is a traditional vintage and rural harvest holiday in Georgia accompanied by feasts, musical events, and other celebrations. It normally takes place in late September in eastern Georgia and in mid-October in western Georgia.

It was in the mid-September of 2017, we had just returned from Latvia, where we already gathered our autumn harvest and decided to spend a weekend in Kakheti (Region of wine), we booked a lovely chateau, next to Gremi monastery complex and just enjoyed our time here. Let the photos speak up for themselves!

Grapes at vineyard

Grapes at vineyard

In Georgia, where wine has an iconic significance, the tradition of rtveli dates back to ancient times, having its roots in the festivity of mid-Autumn abundance and variety. Rtveli usually lasts for several days, with people starting working in early morning hours and ending the day with a feast in the accompaniment of vintage-themed folk songs.

Truck column taking grapes for processing

Truck column taking grapes for processing

The column was very long, indeed. Most probably were taken to Vinery Khareba in Kvareli, place better know with its unique wine tunnel. See:  Wine Tunnel Near Kvareli in Georgia (Winery Khareba)

Local farmers

Local farmers

Grapes post-processed

Grapes post-processed

A small winery at Chateau Eniseli in Kakhetia. 

A lovely experience. Though we didn't take a part in this Rtveli, instead just enjoyed great views and lovely time. A piece of Life after all.