Latest posts

Browse topics

How to List Related Tags on Drupal Taxonomy Pages Using Views

Make sure you check out my previous article How to List Drupal Child Terms on Taxonomy Pages with Views as today I will extend a little bit my previous tutorial and at the end we will add related tags on taxonomy pages using views.

Tools (modules) you will need: Views module and taxonomy module enabled.

Here is the print screen:

Listing related tags on Drupal taxonomy page

Listing related tags on Drupal taxonomy page

Or see live example at Drupal development (or any tag on this blog)

This will work with simple one taxonomy per content type enabled and it will work with multiple taxonomy fields enabled per content type. I'm using two level taxonomy fields - first I have a pre-defined taxonomy fields including child levels, second I have second taxonomy field with tagging enabled in free format. Which basically means following - each article is listed into pre-defined category, like this one goes into Drupal Development, and second tags are added in free format, for example Views, Drupal tutorial... 

In following example we are going to use the power of Views attachments:

Drupal view with attachment

Open your taxonomy/term/% view and add a new attachment. Give it a nice name, Related tags, for example. 

Start by adding following contextual filter:

Content: Has taxonomy term ID (with depth)

  • Depth:0
  • Provide default value: Taxonomy Term ID from URL
  • Load default filter from term page

Relationships:

  • Content: Taxonomy terms on node
  • Require this relationship

Other:

  • Use aggregation: Yes

Format:

  • Format: Unformatted
  • Show: Fields

Fields:

  • Taxonomy term (name)
  • Taxonomy term (tid)
  • Global: Custom

Paste following in Custom field:

<div class="tax-menu">[name] <span class="small"> ([tid])</span></div>

were tax-menu and small are a div classes you can latter use for styling your sub-menu

Sort criteria:

Make sure you remove date, cause it will break things if you have enabled aggregation

  • Taxonomy Term ID, use aggregation Count

Attachment settings:

  • Attach to: Page
  • Attachment position: before

Save your view, and you should be done with technical stuff. Now it is time to apply some CSS. 

Hope this helps! 

How To Sync Drupal RSS Feed to Mailchimp

RSS is not dead, it's more than alive - nowadays it's used to sync content across services and devices.

After finishing installing push notifications for my blog I decided to re-check my e-mail marketing strategy. Wow, it's hard to compare actually - I got about 200 push notifications subscribers in less than 3 days, while my attempts of collecting e-mails turned out to be more gloomy  - about 60 subscribers in 3 months (after which I stopped to collect e-mail addresses at all). Not to speak about crafting and editing each newsletter.

I decided to make my e-mail marketing strategy more simple and more aggressive. By saying simple - I would like to be it fully automated, by saying aggressive - to send out more often . Let me explain - use to I sent a newsletter campaign once in a month and spent few hours crafting each campaign. Now, I want to send a newsletter once a week, and not spend much time crafting each campaign. I'm looking for set and forget setup.

I have changed my mindset a bit as well - if in the past I looked on e-mail marketing as on way to sell (I doubt I have sold anything yet via e-mail), then now I look on it as repeat visitors and loyal audience, which actually is much more than just selling something. I'm glad I have changed my mindset.

Sure thing, buddy, 60 subscribers won't give me much (as of now my site receives about 55,000 unique visitors a month, and 60 subscribers for such amount is ... humble, not to say more). This leads me to install back HelloBar for collecting e-mails and think of new ways to capture audience. 

Now, back to the subject - How to Sync RSS feed to Mailchimp, and no matter is it a Drupal, Wordpress, Joomla or any other Content management system - as long as you have RSS feed, you can sycn it to Mailchimp.

RSS Campaigns are built in a series of steps. If you haven’t started building your RSS Campaign yet, start at the beginning of these instructions. If you already started and saved your progress, skip to the step you want to work on.

To create a new RSS Campaign, follow these steps on Mailchim: Create an RSS Campaign

The settings are pretty straightforward and wont take you even 5 minutes to complete.

The tricky part I found was at formatting the template, by default in the e-mail subject field it was something like that: Posts from ReinisFischer.com for date 27/09/2016, which didn't seems too much lovely, right? I decided to have a Quora digest style e-mail template, and to have as a subject line the title from latest post.

RSS campaing

RSS campaign

To have a post title in e-mail subject field, paste following into Email Subject field:

*|RSSITEM:TITLE|*

Setting up RSS campaign on Mailchimp

Setting up RSS campaign on Mailchimp

When editing your template on Mailchimp, make sure you put RSS block into content area of your template:

Editing template on Mailchimp

Editing template on Mailchimp

Save your changes, give it a few tests - preview live on site and of course send a test e-mail to your self, before actually launching your campaign.

Hope it helps. 

How to List Drupal Child Terms on Taxonomy Pages with Views

I spent a good amount of time at Monday's evening to actually figure this out. In today's Drupal Tutorial - How to List Drupal Child Terms on Taxonomy Pages with Views.

This issue has been on my table for about two years.

For the ease of this tutorial - here is basic setup. For a content type blog I have created pre-defined vocabulary - Category. Most of the category items are not related and are in linear format. But few of them are related and I have listed them as child terms.

Pre-defined category in Drupal

Pre-defined category in Drupal

The tricky part is how to display child terms under parent taxonomy page - let's say a visitor is visiting parent category page - Tourism Objects and we would like to feature a little sub-menu with child terms, like airports, shopping venues e.t.c.

I tried many modules and solutions, but decided to stick with a simple views configuration using attachment feature.

Drupal taxonomy page views to list child terms

In following example I have actually extended a little bit usability by displaying count for each child term using aggregation.

Open your taxonomy/term/% view and add a new attachment.

Give it a nice name, Child terms, for example. 

Start by adding a contextual filter:

  • Taxonomy Term:Parent term
  • Provide default value: Taxonomy Term ID from URL
  • Load default filter from term page

Relationships:

  • Content: Taxonomy terms on node
  • Require this relationship

Other:

  • Use aggregation: Yes

Format:

  • Format: Unformatted
  • Show: Fields

Fields:

  • Taxonomy term (name)
  • Taxonomy term (tid)
  • Global: Custom

Paste following in Custom field:

<div class="tax-menu">[name] <span class="small"> ([tid])</span></div>

were tax-menu and small are a div classes you can latter use for styling your sub-menu

Sort criteria:

Make sure you remove date, cause it will break things if you have enabled aggregation

  • Taxonomy Term ID, use aggregation Count

Attachment settings:

  • Attach to: Page
  • Attachment position: before

Save your view, and you should be done with technical stuff. Now it is time to apply some CSS. Here is what I got at the result:

Listing child terms on Drupal taxonomy page

Listing child terms on Drupal taxonomy page

Using similar approach (attachment) I have attached taxonomy term description and even Google Maps to my category pages.

How To Setup Web Push Notifications for Drupal or Any Site using PushEngage

Push Notifications seems are hot and worth to invest trend nowadays. I have seen them around for about last 6 months in blogs, portals and other websites.  

In fact I have always chose to block them, when popped in my Chrome Browser, as I think they might be annoying. On the other hand as a blogger with pretty solid audience (more than 55,000 unique monthly users) I have wandered maybe it's worth to explore them more and implement on my blog?! As I see it now - web push notifications could help me to increase repeat visitors and page views, that's the reason I finally opted in and implemented web push notifications.

In todays Drupal development series - How To Setup Push Notifications for Drupal or Any Site using PushEngage.

PushEngage

PushEngage (Image courtesy: PushEngage.com)

Here is the fun fact - my smartphone have been broken for about 2 weeks (glass is broken), and I haven't repaired it or bought a new one - I didn't had a smartphone to perform my tests on. But I had a great partner and bug fixer in the other part of the world - my dad. I would like to express many thanks to my dad for a sleepless night, helping me out to implement and bug fix web push notifications on Android phone. Thanks dad, you are the best!

N.B. This article contains affiliate link to PushEngage.com, if you will decide to register a free account there, and latter will upgrade to paid account I might earn an affiliate income from that at no cost to you!

About Web Push Notifications

If you ask a room of developers what mobile device features are missing from the web, push notifications are always high on the list.

Push notifications allow your users to opt-in to timely updates from sites they love and allow you to effectively re-engage them with customized, engaging content. See more: Push Notifications on the Open Web

As a Drupaler I just logically went for a search for Drupal modules promising to enable push notifications for my blog, here are two I found:

From the two above listed, first (Push Notifications) seems to offer a lot, but involves great learning curve (You won't be able to set it up and run in 5 minutes), I was not in the mood to spend countless hours on developing a totally free feature. I opted for the second (Roost Web Push).

Although Roost Web Push promises to tackle all the hard work in place of you - I encountered few issues with it, and generally was left with a feeling that GoRoost.com is somehow dead and not supported from the side of developers (as of September 2016). After all I wasn't able to setup a correct installation with GoRoost.

Update: I got a reply from GoRoost.com support after 2 days and seems issues were corrected, thus I was already using PushEngage platform.

I didn't stopped my search and found few more services helping to setup web push notifications (Not related to Drupal). Here are few: Finebird.com, PushScrew.com and finally after reading article on shoutMEloud: How To Make Your Blog Push Notification Ready In The Next 5 Minutes I decided to give a try to PushEngage.com

All of the above listed offers more or less the same functionality - in short enable a JavaScript code in your website template and start gathering data. 

Here are things I didn't find cool at Finebird - at time of writing this article it was missing Auto Push feature (I would love to sync all blog content with service).

Pushcrew on the other hand handles RSS - Auto Push feature, but I had problems to enable single-opt in notification block for my HTTPS site. I had a chance to send a request to support desk and ask them to enable it for me. I actually did send that request and after few hours got a response with instructions, but by that time I was already using PushEngage - which worked smoothly out of box. (I had few problems with it, but generally speaking - PushEngage did what it promised - Target Desktop and Mobile users on Chrome and Firefox through Push Notifications. Implement in 5 mins. Exactly 5 minute implementation was what I was looking for, and more or less I did everything running in 5 minutes.

How To Setup Web Push Notifications for Drupal or Any Site using PushEngage

Start simple - visit PushEngage a register a free account. After successful registration follow installation instructions:

1. Include The Core JS Code

Copy and paste code from box to your website template (Speaking of Drupal, paste it into .html.tpl file - I prefer to include external scripts at the bottom of html, so I copied mine at the end of html.tpl file

<script src="https://clientcdn.pushengage.com/core/YOUR-NUMBER.js"></script> 
<script> _pe.subscribe(); </script>

Make sure you change YOUR-NUMBER. 

For Drupal -  clear the cache and / or inspect the source - does new JS file is actually loading.

2. Download Package Files(Only for HTTPS Implementation)

Learn more how to enable HTTPS for your Drupal site: Linode: How To Secure Nginx with Let's Encrypt on Ubuntu 12.04

Download the Package of files which include Manifest file,Service Worker file by clicking the link on from your PushEngage account and store them in your websites root folder

3. Give it a try

If done right - everything should work out of the box now. Start collecting subscribers and prepare for the first camping.

Possible problems, issues

Just shortly I registered for a PushEngage account I got a message from developer and founder of PushEngage Ravi Trivedi, with congrats and further steps.

By this time I already figured out - Web Push notifications are not working on iOS, and I did send a reply:

Reinis here, I did setup my push notifications already and I'm planing to see it on action by using RSS feed from blog. 

Here is my site: https://www.reinisfischer.com

Is there any planned upgrade for IOS anytime soon?

 
And got reply:

Unfortunately iOS does not support Browser Push Notifications , so we cant implement Browser Push on Chrome, Firefox, or Safari on iPhones/iPads.   

In terms of Safari support for Mac computers, we will be launching that shortly.

 

Next I figured out that RSS-Auto Push is not actually sending out my notifications and I couldn't figure out how Geo - locations works, so another question(s)


1. If sending notifications under Advanced Options for Geo Location I don't see country, state or city, just "No Result found"  - why it is so, and could it be there are some bots enabling notifications?
2. I enabled RSS-Push notifications, but haven't seen them sending out, I added my RSS in XML format - like this 
https://www.reinisfischer.com/rss.xml
Is that a right format? Or should I use some other format for RSS?
 

And a quick reply:


1.  We use a third party vendor for identifying the geo location of a push subscriber (IP to Geo mapping), and that vendor has some outage, and hence we are seeing this issue where new subscribers are coming in without  a geo location.  We are looking at addressing this urgently, and once this is taken care your subscribers will have geo location. Apologies for the issue.

2. When did you enable RSS Auto Push?  The configuration seems fine.  The way it works is that every 30 minutes, it checks for new posts in last 30 minutes and sends them out as Push Notifications.   I noticed you have set your time zone as GMT, and the RSS feed also is in GMT. Last post was updated at 04:15 GMT, so if you set this after 5:00 AM GMT, it had no posts to send.
 

The Bottom Line

By now (September 2016) web push notifications seems still new and unusual marketing channel for web apps (blogs, portals and so on), but I believe we will heard of them more and more, and yes, most probably the CTR will decrease, but as of now - what are you waiting for? Start implementing web push notifications now.

PushEngage Dashboard

PushEngage Dashboard

In less than 24 hours I was able to gather 74 subscribers. Amazing. I still wonder how many actually have pressed block instead of allow from notification bar?!

It seems I will be able to gather a 2500 subscribers in less than 3 months, in that way I will need to upgrade to a paid account.

About PushEngage

Implement Push Notifications in 5 Minutes

PushEngage enables Push without requiring your website to implement HTTPS. Add the javascript code to your site and go live in 5 minutes.

High Click Through Rates than Email

Because of higher views for notifications, and urgency of the message, with browser push notifications, you will notice 5 to 10x higher click rate over email.

Engage Mobile Audience without Mobile App

Mobile Browsers support push notifications, so now you can re-engage with your audience and increase your repeat visitors to the mobile website. Now you dont need an mobile app to engage users in browser.

Personalized Messaging

Target notifications based on preferences, categories, or custom segments, and get higher click rates and higher conversion.

Re-Engage With Users Anywhere

Reach your when users when they are not on your website. Increase repeat users to your site using browser push notifications. These are delivered to user real-time, in the browser.

Schedule Notifications

Reach your users when they are likely to open your message. Schedule notifications to save you time.

Learn more at PushEngage.com

'Delicious Ravioli' on Tumanyan street in Yerevan

Delicious Ravioli on Tumanyan street in Yerevan, Armenia serves a traditional Georgian cuisine. Actually this is a typical khikali place and I still wonder why this place is called a Ravioli place instead of Khinkali, as in Russian language sign - this place is still called Tasty Khinkali. Strange.

Anyway, as usually when abroad I search for a Georgian cuisine. Last time I visited Georgian Tavern in Tallinn, Estonia, today was Yerevan's turn. Another evening, another Yerevan restaurant. 

We visited Delicious Ravioli just shortly we returned from Khor Virap monastery complex.

Delicious Ravioli

Delicious Ravioli

This restaurant is located in basement, and you must look really carefully to find it. 

Interior at Delicious Ravioli

Interior at Delicious Ravioli

Pretty good and stylish. Very red :)

Khinkali at Delicious Ravioli place

Khinkali at Delicious Ravioli place

The Bottom Line

Food was good, really good prepared khinkali accompanied with Georgian Saperavi lemonade. Budget? Don't recall exactly but pretty affordable. Would love to return.