Drupal 8 Rules module - How to configure Rules module to send email notification for every comment posted
Introduction In our previous post, where we saw How to configure comments module…
October 07, 2017
I was using On page optimization of the article pages, and found that meta description value was exceeding the maximum 160 character limit. Then, my struggle started to find a way to limit this description limit. And, I found a solution.
And, in my metatag setting, I have set the value of Meta description to:[node:summary] token. Which was perfectly being replaced with the content of my article text. But, the problem was that it was coming out way more than 160 characters.
The drupal code actually put everything till first text break(paragraph break) into summary field.
I didn’t want to write custom code for this, which I could. But, drupal best practices says, that we should not change code of Core modules. Rather do an override kind of stuff. So, I was looking for some hooks, and override methods which can help me.
I saw this code for summary:
$trim_length = $instance['display']['teaser']['settings']['trim_length'];
So, this shows that the code was getting the max length value from teaser display settings.
Then, click on setting button for Body. In my case, it was 600. I changed it to 160. And, Voila.
To test, just view the pages. You will not need to update(edit/save) them.
Enjoy.
Introduction In our previous post, where we saw How to configure comments module…
Youtube APIs are great way to fetch details about video or channels. I’ve…
I have a custom content type, and there are around 2000 number of nodes in my…
Many times, while administering your drupal website, you must have encountered…
Problem Statement I’ve been using image styles, and heavily used “Scale and crop…
Introduction In previous posts, we saw how to build FIPS enabled Openssl, and…
Introduction This post has the complete code to send email through smtp server…
Introduction In a normal email sending code from python, I’m getting following…
Introduction In one of my app, I was using to talk to . I have used some event…
Introduction So you have a Django project, and want to run it using docker image…
Introduction It is very important to introduce few process so that your code and…
Introduction In this post, we will see a sample Jenkin Pipeline Groovy script…