Latest posts

Browse topics

How To Setup Pretty URL's For Drupal 8

It seems just yesterday I wrapped a simple Drupal tutorial on how to enable pretty URL's for Drupal 7 site. Turns out already three years have passed. Time flies, newer versions of Drupal emerges, but the question remains pretty popular. I could point you to the previous article, but things have changed a little bit in Drupal 8, thus the principles stays the same.

Today I will provide a simple tutorial on how some (perhaps you) can enable pretty URL's for Drupal 8 site. 

One of the most common Drupal tasks is to setup - Drupal friendly URL's - friendly both for humans and SEO. In fact - friendly URL's have been one of the main SEO strategies for the past decade (at least).

Default Drupal path structure is like this - node/4803, which is nice - but if you would like to convert node/4803 to /my-awesome-title, you will need to download and enable Pathauto module.

  • Download Pathauto module (with it's dependencies - Ctools and Token modules)
  • Extract them to /modules folder 
  • Enable Pathauto from Extend section (admin/modules)

Installing Pathauto module for Drupal 8

Installing Pathauto module for Drupal 8

Once you are done with the technical stuff, visit Patterns page (admin/config/search/path/patterns) and click on the Add Pathauto pattern.

  • From the Pattern type drop down menu choose: Content
  • Path pattern: [node:title]
  • Content type: Select all which applies 
  • Label: Give it a nice name, for example NODE URL

Configuring Drupal 8 patterns

Configuring Drupal 8 patterns

Click on the Save button, and lets proceed with generating new URL alias.

Click on the Bulk Generate tab (admin/config/search/path/update_bulk), and select types of paths to generate alias, in this case I have created the pattern just for Content, so I will check next to the Content. 

Bulk generate URL aliases

Bulk generate URL aliases

Click on the update and wait for URL aliases to be populated. Congrats, you have just enabled Pretty URL's for your Drupal 8 site.

Following patterns can be used (or browse through available tokens and configure your own)

  • [node:title] - for Default path pattern
  • topics/[term:name] - for default path pattern for all tags

Theming Drupal 8: How To Include the Facebook JavaScript SDK

That time have come - and I have started to officially develop my first Drupal 8 site - I won't go into details by comparing Drupal 8 vs Drupal 7 or Drupal 6 (as I think that's a topic for another article).

Today I will show how one (perhaps you) can include default Facebook JavaScript SDK library to your Drupal 8 site. I'm working on simple business website, which has a Facebook business page, and we want to include Facebook page plugin into site's sidebar.

For getting actual code, you must first visit Developers Central on Facebook and customize your Page plugin according to your need, next you must copy/paste two sections of code. First - include SDK library, second paste actual code to generate Facebook page plugin on your Drupal site.

Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8&appId=YOUR_ID";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

For pasting code into sidebar I'm going to use Drupal blocks section, but to actually get them working we must include JavaScript SDK library into theme. The principles for including library into Drupal 8are more or less the same as it is in Drupal 7.

Place this code wherever you want the plugin to appear on your page.

<div class="fb-page" data-href="https://www.facebook.com/yourpage/" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/yourpage/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/yourpage/">yourpage</a></blockquote></div>

For this project I'm using a free Drupal Zymphonies theme. Thus the basics applies to every Drupal 8 theme. 

Locate the html.htnl.twig file (for Zymphonies theme - theme/drupal8_zymphonies_theme/templates/layout)

Copy code you get at developers.facebook.com, save file, right after the opening <body> tag, clear cache and you are done.

Hope this helps!

Russia–Georgia Friendship Monument / Gudauri Viewpoint

In fact I had to open a Wikipedia to learn the name of this place, as I mistakenly thought this is just some cool viewing platform located high in the Caucasus mountains, built by Soviets. Turns out it's not only built by Soviets, but bears the name of The Russia–Georgia Friendship Monument

Located on the Georgian Military Highway between the ski resort town of Gudauri and the Jvari pass, the monument is a large round stone and concrete structure overlooking the Devil's Valley in the Caucasus mountains.

Russia–Georgia Friendship Monument

Russia–Georgia Friendship Monument

This monument has been built in 1983 to celebrate the bicentennial of the Treaty of Georgievsk and ongoing friendship between Georgia and Soviet Russia.

Soviet design

Soviet design

Inside the monument is a large tile mural that spans the whole circumference of the structure and depicts scenes of Georgian and Russian history.

But what's cool - a spectacular view can be observed from this viewing platform:

Caucasus Mountains

Caucasus Mountains

For the history lovers - Treaty of Georgievsk

The Treaty of Georgievsk was a bilateral treaty concluded between the Russian Empire and the east Georgian kingdom of Kartli-Kakheti on July 24, 1783. The treaty established Georgia as a protectorate of Russia, which guaranteed Georgia's territorial integrity and the continuation of its reigning Bagrationi dynasty in return for prerogatives in the conduct of Georgian foreign affairs. By this, Georgia abjured any form of dependence on Persia (who had been the suzerains of most of Georgia for centuries) or another power, and every new Georgian monarch would require the confirmation and investiture of the Russian tsar.

This place is very cool to fly a drone around, see: Gudauri View Point from a drone flight

Zhinvali Water Reservoir, Georgia

Zhinvali, also Jinvali, is an artificial water reservoir located on the river Aragvi in Georgia. The building of the hydroelectric dam formed the Zhinvali Reservoir. The dam has been built in 1986.

You have probably noticed this perfect blue surface lake, if traveled to Gudauri or mount Kazbegi (Gergeti church) via Georgian military road. If not, and you are still planing your trip to this area, the chances are you will make a stop at Ananuri castle complex (which is located near Zhinvali water reservoir), but there is a small watching platform when approaching from Tbilisi - a perfect place for a group photo or as I prefer - landscape photography.

Zhinval water reservoir

Zhinval water reservoir

We were on a trip to mount Kazbegi (Stepantsminda) and I decided to make a short 10 minute stop here, so I can experiment with a HDR photography

Zhinvali water reservoir

Zhinvali water reservoir

See also: Algeti Reservoir in Georgia

Tbilisoba (Tbilisi City Festival) 2016

Tbilisoba or Tbilisi City Festival is an annual October festival which celebrates the diversity and history of Tbilisi, the capital of Georgia. If you are planing your first trip to Georgia - consider your trip here during city festival and try local cuisine and that awesome Georgian wine. 

Tbilisoba 2016 were held on October 15-16 in the streets of ..you are right - Tbilisi. As usual I took my camera and went for a photo walk, starting Rike Park, ending at the right embankment of Mtkvari. My best finds this year was: Dzin Chao food tent and mcvadi from farmers. 

Raft in th River of Mtkvari

Raft in th River of Mtkvari

There is a tradition to ride a raft during Tbilisi City Festival. 

Colorful balloons at kid zone

Colorful balloons at kid zone

This year the kids zone were set at Rike park.

Tbilisoba was first held on October 28, 1979, and has since become an established tradition. The festival features open-air concerts of traditional music and dancing and various cultural events, centered on Old Tbilisi, the historical part of the city. Beyond celebrating the city's past and present, people from all over Georgia represent their region at the fair of the harvest and Rtveli. Awarding honorary citizenship of Tbilisi by the city government also occurs in the framework of Tbilisoba.

Aerial view of Rike park in Tbilisi

Aerial view of Rike park in Tbilisi

The festival was created at the initiative of Eduard Shevardnadze, then-the First Secretary of the Communist Party of the Georgian Soviet Socialist Republic, to honor the capital and counter attendance at religious events as part of his program to overcome "manifestations of nationalism" through introducing new "socialist traditions". The event became a celebration of the city’s 1,500-year history and had the unintended effect of engaging Georgians more intensely in their national history.The festival remained dormant during the civil unrest of the early 1990s. It was resumed in 1995 and has since been held annually, usually in the latter half of October.

Painted pumkins

Painted pumpkins

It's still few days before the Halloween night approaches, but you can grab your pumpkin here, and then  learn How To Carve a Pumpkin and Make Stunning Halloween Photos

Mcvadi being prepared

Mcvadi being prepared

Tap Wine

Tap Wine

Streets of Tbilisi during Tbilisoba

Streets of Tbilisi during Tbilisoba

mcvadi at Tbilisoba's farmers market

mcvadi at Tbilisoba's farmers market

The Bottom Line

One of the best ways to discover Tbilisi and Georgia in short amount of time, best from the farmers in the heart of Tbilisi. Don't miss you chance!