Show the link title/description in Twig template on Drupal 8

Show the link title/description in Twig template on Drupal 8

We wanted to actually display the link’s description tag on the page but couldn’t find a way to do it. We were using {{ link(item.title, item.url) }} to render a link but we couldn’t get the title tag to show up in a Twig variable. Eventually with the use of {{ kint(item) }} and searching through the stack we found out how to get it: {{ item.original_link.getDescription() }} It is defined here: web/core/modules/menu_link_content/src/Entity/MenuLinkContent.php in getPluginDefinition() function It should be in…

Read More Read More

Migrate Gitorious to GitLab

Migrate Gitorious to GitLab

For the script, find it on GitHub Our company recently moved over 200 of our Git repositories from our self-hosted Gitorious server to the brand-new GitLab. Moving over to GitLab has completely changed our workflow. Gitorious hadn’t been getting updates and in fact the company has been bought by GitLab. GitLab offers unlimited users and repositories for free and has a really nice interface. The problem is that we had over 200 repositories sitting on Gitorious so even a very busy…

Read More Read More

Using Sublime Text on Remote Servers (Mac OSX)

Using Sublime Text on Remote Servers (Mac OSX)

If you need to work on a remote server and aren’t comfortable with tools like Vim or Emacs, this technique will let you use Sublime Text to work with remote files. This script works by mounting directories of remote servers on our local machine and work with them as if they are local machines. This article will walk you through setting up the scripts and shortcuts on your machine so you can use this fast and convenient method too. Obviously, it…

Read More Read More

Make a Webform available as a block in Drupal 7

Make a Webform available as a block in Drupal 7

Making Drupal Webforms available on blocks on Drupal 7 is something you’d think would be simple but it’s buried away among all the Drupal options. When you create a new Webform, you will see a set of tabs up the top. Next to [View], [Edit] there should be a [Webform] tab. Click that and go to > [Form Settings] > [Advanced Settings] and select ‘ Available as block‘ option. This will make the form show up as a block so you…

Read More Read More

Making WordPress store its files in a secret folder

Making WordPress store its files in a secret folder

I installed a fresh copy of WordPress but wanted to keep my root directory clean. The easiest way to do this is just to install it into a directory, change the site address to the root, and then copy the index.php up one level and change the line about requiring the wp-blog/header file to reference the directory you just installed WordPress into. [code language=”php”]require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ ); [/code] becomes [code language=”php”]require( dirname( __FILE__ ) . ‘/newblog/wp-blog-header.php’ );…

Read More Read More