Kubernetes - How to Set Namespace So You Do Not Need to Mention it Again and Again in Kubectl Commands.
Introduction In some of the cases, we need to specify namespace name along with…
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 some of the cases, we need to specify namespace name along with…
Github is an awesome place of storing your code. Now, it also allows you to have…
So, you want to run your code in parallel so that your can process faster, or…
Introduction While this topic may applicable to all mysql/mariadb users who…
Being a drupal user from last around 5 years, I used to know small codes for…
Introduction In our previous post, where we saw How to configure comments module…
Introduction In this post we will see following: How to schedule a job on cron…
Introduction There are some cases, where I need another git repository while…
Introduction In this post, we will see how to fetch multiple credentials and…
Introduction I have an automation script, that I want to run on different…
Introduction I had to write a CICD system for one of our project. I had to…
Introduction Java log4j has many ways to initialize and append the desired…