<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="https://www.gregboggs.com/categories/drupal/index.xml" rel="self" type="application/rss+xml" />
    <title>Drupal on Portland Drupal Developer </title>
    <link>https://www.gregboggs.com/categories/drupal/</link>
    <language>en-US</language>
    <description>Drupal tips by Greg Boggs.</description>
    <copyright>Copyright (c), Greg Boggs; all rights reserved.</copyright>
    <lastBuildDate>Wed, 22 May 2024 00:00:00 UTC</lastBuildDate>
    
    <item>
      <title>Transitioning from Drupal 7 to Backdrop CMS</title>
      <link>https://www.gregboggs.com/transitioning-from-drupal7-to-backdrop-cms/</link>
      <pubDate>Wed, 22 May 2024 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/transitioning-from-drupal7-to-backdrop-cms/</guid>
      <description>

&lt;p&gt;This is a guest post by &lt;a href=&#34;https://kanapatrick.cm/en&#34;&gt;Kana Patrick&lt;/a&gt; who is a world-class Drupal migration expert.&lt;/p&gt;

&lt;p&gt;As the impending end of life for Drupal 7 draws near, the necessity for website owners to consider their migration options becomes increasingly urgent. While the prevailing trend in the Drupal community leans towards transitioning to Drupal 10 to leverage its modern features, some are hesitant due to the associated costs.&lt;/p&gt;

&lt;p&gt;In this discourse, we advocate for a different approach by presenting compelling reasons to shift your website from Drupal 7 to Backdrop CMS if you have not already done so.&lt;/p&gt;

&lt;h2 id=&#34;embracing-backdrop-cms:7758ecad24a22aebe5ec16cfb33a4e78&#34;&gt;Embracing Backdrop CMS&lt;/h2&gt;

&lt;p&gt;Backdrop CMS emerges as a noteworthy contender in the realm of content management systems, originating as a fork from Drupal 7. Conceived in 2013 by Nate &lt;strong&gt;Lampton and Jen Lampton&lt;/strong&gt;, this platform sought to streamline and enhance the foundational code of Drupal 7 while maintaining cost-effectiveness for users.&lt;/p&gt;

&lt;p&gt;The reluctance of many website owners to depart from Drupal 7 may stem from financial constraints, sentimental attachment to the platform, or various other factors. However, the looming conclusion of Drupal 7&amp;rsquo;s lifecycle, coupled with the cessation of community support, prompts a reevaluation of alternatives.&lt;/p&gt;

&lt;p&gt;A viable solution lies in transitioning directly to Backdrop CMS, offering a cost-effective migration path that preserves much of the original project&amp;rsquo;s structure since both systems share a common API rooted in Drupal 7.&lt;/p&gt;

&lt;p&gt;Despite its nascent community, the Backdrop project signifies a supportive ecosystem that can aid in the growth of your endeavors, a valuable asset for those seeking assistance and collaboration.&lt;/p&gt;

&lt;h2 id=&#34;advantages-of-migrating-to-backdrop-cms:7758ecad24a22aebe5ec16cfb33a4e78&#34;&gt;Advantages of Migrating to Backdrop CMS&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Backdrop CMS inherits the strengths of Drupal 7 while introducing distinct features.&lt;/li&gt;
&lt;li&gt;It boasts modest system requirements, translating to affordable hosting solutions.&lt;/li&gt;
&lt;li&gt;Unique functionalities absent in Drupal core are seamlessly integrated into Backdrop&amp;rsquo;s core framework.&lt;/li&gt;
&lt;li&gt;Backdrop furnishes a robust foundation with extensive extensibility through contributed modules, harnessing the full capabilities of Drupal.&lt;/li&gt;
&lt;li&gt;Scheduled updates and version releases provide a predictable timeline, mitigating uncertainties surrounding module updates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In conclusion, &lt;strong&gt;Backdrop CMS&lt;/strong&gt; emerges as a compelling alternative for Drupal 7 projects facing obsolescence. Evaluating the migration effort from &lt;strong&gt;Drupal 7 to 10&lt;/strong&gt; against a transition to Backdrop CMS presents an intriguing comparison. &lt;strong&gt;Should you require guidance or support in your migration journey to Backdrop CMS, do not hesitate to reach out for assistance.&lt;/strong&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Get Involved: Ways to Contribute to Drupal, No Experience Required</title>
      <link>https://www.gregboggs.com/get-started-contributing-to-drupal/</link>
      <pubDate>Wed, 25 Jan 2023 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/get-started-contributing-to-drupal/</guid>
      <description>

&lt;p&gt;There are many ways to contribute to an open source project like Drupal, and not all of them require a deep understanding of programming or web development. Some examples of ways to contribute include:&lt;/p&gt;

&lt;h2 id=&#34;how-to-contribute-to-drupal-ways-for-everyone-to-get-involved:77fd61a8e7b5acfcb027eeed10c76f4c&#34;&gt;How to Contribute to Drupal - Ways for Everyone to Get Involved&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Testing and reporting bugs:&lt;/strong&gt; This can be done by looking through the &lt;a href=&#34;https://www.drupal.org/project/issues/easy_breadcrumb?text=&amp;amp;status=8&amp;amp;priorities=All&amp;amp;categories=All&amp;amp;version=All&amp;amp;component=All&#34;&gt;issue queue on Easy Breadcrumb&lt;/a&gt; and look for issues that are marked &amp;ldquo;Needs Review&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Documentation:&lt;/strong&gt; Writing and improving documentation is a valuable way to help others learn and use Drupal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Translation:&lt;/strong&gt; Helping to translate the interface and documentation of Drupal into diffrent languages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Support:&lt;/strong&gt; Answering questions on forums and providing assistance to others in the community.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design and User Experience:&lt;/strong&gt; Helping to improve the look and feel of Drupal, and making it more user-friendly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Marketing and outreach:&lt;/strong&gt; Helping to promote Drupal and increase its visibility.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code contributions:&lt;/strong&gt; If you do have the skills, contributing code is a graet way to help improve Drupal and add new features. Swap the &amp;ldquo;Needs Review&amp;rdquo; filter to &amp;ldquo;Needs Work&amp;rdquo; and pick a task!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;drupal-contributor-resources:77fd61a8e7b5acfcb027eeed10c76f4c&#34;&gt;Drupal Contributor Resources&lt;/h2&gt;

&lt;p&gt;So, anyone can contribute to Drupal community, regardless of their technical skills. To get started with contributing to Drupal, there are a few resources that can be helpful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Drupal &lt;a href=&#34;https://www.gregboggs.com/drupal-development-best-practices/&#34;&gt;Best Practices&lt;/a&gt; is a series of best practice posts that will help you get better at site building.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://www.drupal.org/community&#34;&gt;Drupal community&lt;/a&gt; is a great place to connect with other developers and contributors. You can find information on upcoming events, join groups, and participate in discussions.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://www.drupal.org/project/issues&#34;&gt;Drupal issue queue&lt;/a&gt; is where you can find bugs and feature requests that need to be addressed. You can start by looking for issues that are labeled &amp;ldquo;novice&amp;rdquo; or &amp;ldquo;mentored&amp;rdquo; to find tasks that are well-suited for new contributors.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://www.drupal.org/docs&#34;&gt;Drupal documentation&lt;/a&gt; is a good resource for learning about the platform and its various components.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://www.drupal.org/docs/8/contributor-guide&#34;&gt;Drupal handbook&lt;/a&gt; is a great resource for understanding the process of contributing to Drupal, including information on coding standards and best practices.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.drupal.org/slack&#34;&gt;The Drupal Maintainers Slack channel&lt;/a&gt; is a great place to ask for help and connect with other developers, especially #maintainer channel which is for project maintainers and developers to discuss on how to maintain modules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No matter what your skills are, there&amp;rsquo;s a way for you to contribute to the Drupal community. Join us, and make a difference!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title> Unleash the Power of Drupal 9 Routing: Create Custom Routes with Page Callbacks &amp; Debug Like a Pro</title>
      <link>https://www.gregboggs.com/debugging-routing-page-callbacks-drupal10/</link>
      <pubDate>Tue, 17 Jan 2023 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/debugging-routing-page-callbacks-drupal10/</guid>
      <description>

&lt;p&gt;Routes in Drupal are a powerful tool to programatically execute code and build custom pages for tasks such as custom forms and data processing. However, Routes rely on learning a few key concepts and  they can be tricky to learn at first. So, lets break them down step by step.&lt;/p&gt;

&lt;h2 id=&#34;how-do-i-create-a-route-with-a-page-callback-in-drupal-10:b035290cb96b7d9ce052bfc9128bf19f&#34;&gt;How do I create a route with a page callback in Drupal 10?&lt;/h2&gt;

&lt;p&gt;To create a route file with a page callback in Drupal, you can follow these steps:&lt;/p&gt;

&lt;p&gt;Create a new file in your module&amp;rsquo;s src/Routing directory, named module_name.routing.yml.
In this file, define your route using the YAML syntax. An example of a basic route might look like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;module_name.example:
  path: &#39;/example&#39;
  defaults:
    _controller: &#39;\Drupal\module_name\Controller\ExampleController::examplePage&#39;
    _title: &#39;Example Page&#39;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The path key defines the URL path of the route, and the defaults key contains the page callback and page title for the route. In this example, the page callback is a method named examplePage in the ExampleController class of the module_name module.&lt;/p&gt;

&lt;p&gt;Clear Drupal cache so the new route can be picked up by the system.&lt;/p&gt;

&lt;p&gt;That&amp;rsquo;s it! The new route should now be accessible at the URL /example and will use the specified page callback method.
You can also pass a parameter in the path, for example path: &amp;lsquo;/example/{parameter}&amp;rsquo;
and use it in the controller with $parameter = $route-&amp;gt;getparameter(&amp;lsquo;parameter&amp;rsquo;)&lt;/p&gt;

&lt;h2 id=&#34;how-do-i-debug-a-drupal-10-routing-file:b035290cb96b7d9ce052bfc9128bf19f&#34;&gt;How do I debug a Drupal 10 routing file?&lt;/h2&gt;

&lt;p&gt;There are several ways to debug a routing file in Drupal 10, here are some examples:&lt;/p&gt;

&lt;p&gt;Use the Devel module: The Devel module is a popular development tool for Drupal, it provides a suite of debugging tools, including the ability to view the routing information for your site. To enable this feature, you need to install and activate the Devel module, and then navigate to the &amp;ldquo;Devel&amp;rdquo; -&amp;gt; &amp;ldquo;Routes&amp;rdquo; page to view the routing information for your site.&lt;/p&gt;

&lt;p&gt;Use the Drupal Console: The Drupal Console is a command-line interface for Drupal that provides a variety of debugging tools. To use the Drupal Console to debug your routing file, you can use the command drupal router:debug to view the routing information for your site.&lt;/p&gt;

&lt;p&gt;Use the dpm() function: The dpm() function is a debugging function provided by the Devel module that allows you to print variables to the message area of the page. By adding dpm($routes) to the routing file, you can see the array of all routes.&lt;/p&gt;

&lt;p&gt;Use the kint() function: The kint() function is also a debugging function provided by the Devel module that allows you to print variables to the message area of the page, but with more information than dpm(). By adding kint($routes) to the routing file, you can see the array of all routes and more information about the routes.&lt;/p&gt;

&lt;p&gt;Use the browser developer tools: By using browser developer tools, you can see all the requests made by the browser and check if the routing file is working correctly.&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s important to remember that you should only use these debugging tools during development and remove them before deploying to a production environment, as they can expose sensitive information about your site.&lt;/p&gt;

&lt;h2 id=&#34;how-do-i-make-my-route-higher-priority-in-drupal-10:b035290cb96b7d9ce052bfc9128bf19f&#34;&gt;How do I make my route higher priority in Drupal 10&lt;/h2&gt;

&lt;p&gt;In Drupal 10, you can make a route have a higher priority than others by setting a higher weight for the route in the routing file. Here&amp;rsquo;s an example of how to do this:&lt;/p&gt;

&lt;p&gt;In your routing file, you can set the weight property for your route. The weight property is used to determine the order of the routes. Routes with a higher weight will be matched first.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;empty_front_page.content:
  path: &#39;/&#39;
  defaults:
    _controller: &#39;\Drupal\empty_front_page\Controller\EmptyFrontPageController::content&#39;
    _title: &#39;Empty Front Page&#39;
  weight: 10
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The default weight is 0. If you want your route to have a higher priority, you can set a higher weight. In the example above, the weight is set to 10, which makes it have a higher priority than any other route with a lower weight.&lt;/p&gt;

&lt;p&gt;Keep in mind that if you have multiple routes with the same weight, the order in which they are defined in the routing file will determine which route is matched first.&lt;/p&gt;

&lt;p&gt;Clear the cache after making any changes in routing file.&lt;/p&gt;

&lt;p&gt;By setting a higher weight for your route, you can ensure that it is matched before any other routes with a lower weight. This can be useful if you have multiple routes that match the same path and you want to ensure that a specific route is always matched first.&lt;/p&gt;

&lt;p&gt;And there you have it folks, you&amp;rsquo;re now a pro at creating custom routes and debugging like a boss in Drupal. Just remember, if you ever get stuck, don&amp;rsquo;t hesitate to call upon the almighty Drupal gods for guidance&amp;hellip; or just Google it. Happy routing!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Creating the Empty Front Page Module for Drupal 9 with Chat GPT</title>
      <link>https://www.gregboggs.com/empty-front-page-drupal-chat-gpt/</link>
      <pubDate>Mon, 16 Jan 2023 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/empty-front-page-drupal-chat-gpt/</guid>
      <description>

&lt;p&gt;An empty front page in Drupal can be a useful feature for many websites. Whether you want to use the front page for blocks or simply want to direct users to other pages of your website, an empty front page can be a great way to control the user experience on your website. In this blog post, we will discuss:&lt;/p&gt;

&lt;h2 id=&#34;how-an-empty-front-page-works:70132e4827e7f29feba902c14224650e&#34;&gt;How an Empty Front Page Works&lt;/h2&gt;

&lt;p&gt;An empty front page in Drupal is simply a page that does not display any content. This can be achieved by creating a custom route for the front page that does not point to any content. In Drupal, the front page is controlled by the &lt;code&gt;system.site&lt;/code&gt; configuration, which can be accessed and edited through the &lt;code&gt;configFactory&lt;/code&gt; service. By setting the &lt;code&gt;&#39;page.front&#39;&lt;/code&gt; value to &lt;code&gt;&#39;/empty-front-page&#39;&lt;/code&gt;, we are able to redirect users to an empty front page when they visit the website&amp;rsquo;s root URL.&lt;/p&gt;

&lt;h2 id=&#34;the-process-of-creating-a-custom-drupal-module:70132e4827e7f29feba902c14224650e&#34;&gt;The Process of Creating a Custom Drupal Module&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Define the route for the empty front page in a routing file&lt;/li&gt;
&lt;li&gt;Create a controller class that handles the logic for the empty front page&lt;/li&gt;
&lt;li&gt;Implement an install hook that sets the front page to the empty front page on module installation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;the-steps-i-took-to-finish-the-module:70132e4827e7f29feba902c14224650e&#34;&gt;The Steps I Took to Finish the Module&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Test the module and fix any bugs or errors&lt;/li&gt;
&lt;li&gt;Ensure that the module met all the Drupal coding standards&lt;/li&gt;
&lt;li&gt;Create a new release on drupal.org&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;chat-gpt-generates-a-unique-solution:70132e4827e7f29feba902c14224650e&#34;&gt;Chat GPT Generates a Unique Solution&lt;/h2&gt;

&lt;p&gt;As a language model, &lt;a href=&#34;https://openai.com/blog/better-language-models/&#34;&gt;ChatGPT&lt;/a&gt; generated this Drupal module and this blog post to provide an overview on how to create an empty front page in Drupal.
GPT-3, or Generative Pre-training Transformer 3, is a neural network-based language model developed by OpenAI that uses deep learning to produce human-like text. This state-of-the-art language model generates text that is difficult to distinguish from text written by humans. ChatGPT generated a unique solution for creating an empty front page in Drupal that didn&amp;rsquo;t exist before.&lt;/p&gt;

&lt;p&gt;If you&amp;rsquo;re interested in using this module, you can find &lt;a href=&#34;Empty Front Page&#34;&gt;https://www.drupal.org/project/empty_front_page&lt;/a&gt; on drupal.org.&lt;/p&gt;

&lt;p&gt;Or, you can check out my other Drupal module that wasn&amp;rsquo;t generated by AI &lt;a href=&#34;https://www.gregboggs.com/drupal8-breadcrumbs/&#34;&gt;Drupal 8 Breadcrumbs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In conclusion, creating an empty front page in Drupal is a relatively simple process that can be achieved by creating a module. By defining a custom route, creating a controller, and setting the &lt;code&gt;&#39;page.front&#39;&lt;/code&gt; value to &lt;code&gt;&#39;/empty-front-page&#39;&lt;/code&gt;, we were able to empty the front page of non-block content when users visit the website&amp;rsquo;s root URL. This allows website owners to have more control over the user experience on their website.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Migrating a website from Drupal 7 to Drupal 9</title>
      <link>https://www.gregboggs.com/upgrade-drupal7-to-drupal9-migration/</link>
      <pubDate>Sun, 03 Jul 2022 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/upgrade-drupal7-to-drupal9-migration/</guid>
      <description>

&lt;p&gt;This is a guest post by &lt;a href=&#34;https://kanapatrick.cm/en&#34;&gt;Kana Patrick&lt;/a&gt; who is a world-class Drupal migration expert.&lt;/p&gt;

&lt;p&gt;The end of life of Drupal 7 is getting closer and every day more and more website owners are starting the migration. This process is not easy and almost always takes a long time. I recently migrated a client&amp;rsquo;s site from Drupal 7 to Drupal 9. The purpose of this article is to share with you my modest experience.&lt;/p&gt;

&lt;h2 id=&#34;different-migration-processes-from-drupal-7-to-drupal-9:bfc9212b7c699d7a687eddcbc914fec8&#34;&gt;Different migration processes from drupal 7 to Drupal 9&lt;/h2&gt;

&lt;p&gt;There are essentially 2 ways to migrate a site from Drupal 7 to Drupal 9:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Updated the site using the migration scripts provided by the Drupal core (Based, since Drupal 8, on the Migrate community module and now in the core);&lt;/li&gt;
&lt;li&gt;Create a completely new Drupal 9 site, and attempt to recover the contents of Drupal 7 (again using Migrate-based tools).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In general, I recommend the second solution, as it is the one that was used in the case of the migration of the Northwest Analytics Inc. Site and it is the one that often generates the least constraints by promising a transformation of the content as needed.&lt;/p&gt;

&lt;p&gt;The website on drupal 7 was launched in 2011 and before the migration
started, it had :
- 5K+ Users
- 3K+ Medias
- 12k+ Noeuds
- 20K+ Webform submission&lt;/p&gt;

&lt;p&gt;Note that the site had multilingual content&lt;/p&gt;

&lt;p&gt;Can you imagine those crazy numbers?&lt;/p&gt;

&lt;p&gt;But despite this size, generally, the whole migration consists of 4 main steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creation of mappings from the old Drupal 7 site to the new Drupal 9 site.&lt;/li&gt;
&lt;li&gt;Creation of the appropriate entities/fields on the Drupal 9 site.&lt;/li&gt;
&lt;li&gt;Content migration itself by migrating module from Drupal 9 core.&lt;/li&gt;
&lt;li&gt;Both Contrib and Custom functionality implementation/migration.&lt;/li&gt;
&lt;li&gt;Theme migration.&lt;/li&gt;
&lt;li&gt;Production deployments and content managers studying.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course, it sounds easier than it is. I have faced many complex and interesting challenges during my migrations. I will do another article on it so I can share my difficulties with you.&lt;/p&gt;

&lt;p&gt;As time goes by, the migration becomes more and more expensive and the old Drupal 7 site is more and more challenging to maintain. Take courage and start migrating your Drupal 7 project to Drupal 9 today. Looking to migrate from your current Drupal 7 site to the new Drupal 9? I invite you to &lt;a href=&#34;https://kanapatrick.cm/en/get-quote&#34;&gt;contact me&lt;/a&gt; for your Drupal site migration projects!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Creating Patches from Drupal Merge Requests</title>
      <link>https://www.gregboggs.com/patches-from-drupal-merge-requests/</link>
      <pubDate>Wed, 25 Nov 2020 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/patches-from-drupal-merge-requests/</guid>
      <description>

&lt;p&gt;Drupal.org has used patches to manage community contribution for many years. But, patches are difficult for new users to learn and require the use of the command line. Recently, Drupal.org code has migrated to Gitlab, and we can now use Gitlab and Drupal.org issues to &lt;a href=&#34;https://www.gregboggs.com/drupal-merge-requests&#34;&gt;create merge request&lt;/a&gt; to share code and fixes with modules and Drupal Core. But, how do you use the code on your site immediately?&lt;/p&gt;

&lt;p&gt;Create a patch file and upload it to the issue on Drupal.org.&lt;/p&gt;

&lt;h2 id=&#34;patches-from-forks:92e2f784d19989e4c827518cd4253f02&#34;&gt;Patches from Forks&lt;/h2&gt;

&lt;p&gt;You can obtain the patch by adding .patch to the URL of a merge request. To get to the merge request, click on the merge request in the issue. Make sure to remove any # from the end of the URL. The URL should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://git.drupalcode.org/project/easy_breadcrumb/-/merge_requests/5.patch&#34;&gt;https://git.drupalcode.org/project/easy_breadcrumb/-/merge_requests/5.patch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From there, save the file as a file named .patch and upload it to Drupal.org!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Drupal Merge Requests using Gitlab!</title>
      <link>https://www.gregboggs.com/drupal-merge-requests/</link>
      <pubDate>Fri, 20 Nov 2020 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/drupal-merge-requests/</guid>
      <description>

&lt;p&gt;Drupal.org has used patches to manage community contribution for many years. But, patches are difficult for new users to learn and require the use of the command line. Recently, Drupal.org code has migrated to Gitlab, and we can now use Gitlab and Drupal.org issues to create Merge Requests to share code and fixes with modules and Drupal Core. Here&amp;rsquo;s an &lt;a href=&#34;https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupal/creating-issue-forks-and-merge-requests&#34;&gt;overview of creating a merge request&lt;/a&gt; for folks who want all the details.&lt;/p&gt;

&lt;h2 id=&#34;drupal-forks-are-special:ef5791cc9e1557e1f146faf2d8c5215e&#34;&gt;Drupal Forks are Special&lt;/h2&gt;

&lt;p&gt;Drupal Gitlab forks are special because they are accessible to everyone with a Drupal.org account. One fork per issue, and anyone can edit the fork and open a merge request to the main project.&lt;/p&gt;

&lt;h2 id=&#34;setup-your-drupal-account:ef5791cc9e1557e1f146faf2d8c5215e&#34;&gt;Setup your Drupal Account&lt;/h2&gt;

&lt;p&gt;Before we begin, you must register for an account on Drupal.org to get access to gitlab forks. Next, add an &lt;a href=&#34;https://www.drupal.org/drupalorg/docs/user-accounts/git-authentication-for-drupalorg-projects&#34;&gt;ssh public key to your Drupal.org user profile&lt;/a&gt; so you don&amp;rsquo;t need a password to work. Lastly, agree to the Drupal.org &lt;a href=&#34;https://www.drupal.org/docs/develop/git/setting-up-git-for-drupal/obtaining-git-access&#34;&gt;git terms of service so you can access forks&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&#34;create-an-issue-on-easy-breadcrumb:ef5791cc9e1557e1f146faf2d8c5215e&#34;&gt;Create an issue on Easy Breadcrumb&lt;/h2&gt;

&lt;p&gt;Before you can create forks on Drupal.org&amp;rsquo;s gitlab, you need an issue! So, start by &lt;a href=&#34;https://www.drupal.org/node/add/project-issue/easy_breadcrumb&#34;&gt;creating an issue on Easy Breadcrumb&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you have the issue, press &amp;ldquo;Create issue fork&amp;rdquo;.&lt;/p&gt;

&lt;h2 id=&#34;clone-easy-breadcrumb:ef5791cc9e1557e1f146faf2d8c5215e&#34;&gt;Clone Easy Breadcrumb&lt;/h2&gt;

&lt;p&gt;Next copy of the module you want to modify. You can get instructions for this by clicking &lt;a href=&#34;https://www.drupal.org/project/easy_breadcrumb/git-instructions&#34;&gt;version control&lt;/a&gt; near the top of the module.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone --branch 8.x-1.x git@git.drupal.org:project/easy_breadcrumb.git
cd easy_breadcrumb
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&#34;make-your-changes:ef5791cc9e1557e1f146faf2d8c5215e&#34;&gt;Make Your Changes&lt;/h2&gt;

&lt;p&gt;Now, edit the code on your own computer to fix the issue. This is the hardest part!&lt;/p&gt;

&lt;h2 id=&#34;send-your-work-to-the-issue-fork-on-gitlab:ef5791cc9e1557e1f146faf2d8c5215e&#34;&gt;Send Your Work to the Issue Fork on Gitlab&lt;/h2&gt;

&lt;p&gt;The exact git commands vary slightly from issue to issue. So, check the &amp;ldquo;view commands&amp;rdquo; link on the issue to see the commands for your issue, but here are the ones I ran. I got the commit message from the commit credit section towards the bottom of the issue.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git remote add easy_breadcrumb-3174165 git@git.drupal.org:issue/easy_breadcrumb-3174165.git
git fetch easy_breadcrumb-3174165
git checkout -b &#39;8.x-1.x&#39; --track easy_breadcrumb-3174165/&#39;8.x-1.x&#39;
git add .
git commit -m &#39;Issue #3174165 by kell.mcnaughton, pattsai: How to support limiting depth&#39; --author=&amp;quot;git &amp;lt;git@3602480.no-reply.drupal.org&amp;gt;&amp;quot;
git push --set-upstream easy_breadcrumb-3174165 HEAD
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The commands do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add the new fork as a remote.&lt;/li&gt;
&lt;li&gt;Fetch the new fork.&lt;/li&gt;
&lt;li&gt;Checkout a branch on that fork.&lt;/li&gt;
&lt;li&gt;Add your work to that branch.&lt;/li&gt;
&lt;li&gt;Commit your work to that branch.&lt;/li&gt;
&lt;li&gt;Push your work to Gitlab.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;open-a-merge-request:ef5791cc9e1557e1f146faf2d8c5215e&#34;&gt;Open a Merge Request&lt;/h2&gt;

&lt;p&gt;Once your work is saved to the issue fork on Gitlab. Go back to the issue on Drupal.org and click Compare near the top of the issue. Then, click open merge request!&lt;/p&gt;

&lt;p&gt;Now that your request is open, the maintainer of the module just needs to press merge on Gitlab to make the code part of the project!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Drupal Maintainer&#39;s Initiative</title>
      <link>https://www.gregboggs.com/drupal-maintainers-initiative/</link>
      <pubDate>Fri, 19 Jun 2020 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/drupal-maintainers-initiative/</guid>
      <description>

&lt;p&gt;With the launch of Drupal 9, the community is rallying to update all of the community contributed modules from Drupal 8 to Drupal 9. This work is often just a single line of code to tell Drupal that the module supports 9. But, for older, out of date modules, the work required to get to Drupal 9 is a bigger effort. Some of these modules haven&amp;rsquo;t been updated in 4 years.&lt;/p&gt;

&lt;p&gt;I&amp;rsquo;m not to complain about problems without solutions. So, how do we fix it?&lt;/p&gt;

&lt;h2 id=&#34;the-maintainer-s-initiative:d8a4001422b6491dab8fe75af22c6293&#34;&gt;The Maintainer&amp;rsquo;s Initiative!&lt;/h2&gt;

&lt;p&gt;Together with &lt;a href=&#34;https://www.damienmckenna.com/&#34;&gt;Damien Mckenna&lt;/a&gt;, we&amp;rsquo;ve started a new Drupal project called &lt;a href=&#34;https://www.drupal.org/project/maintainers&#34;&gt;Maintainers&lt;/a&gt;. Our goal is to support as much of Drupal contrib as we can while focusing on issued marked &amp;ldquo;reviewed and tested by the community&amp;rdquo;. Instead of starting a new module, we&amp;rsquo;re picking up where others left off.&lt;/p&gt;

&lt;h2 id=&#34;finishing-drupal-8-ports:d8a4001422b6491dab8fe75af22c6293&#34;&gt;Finishing Drupal 8 Ports&lt;/h2&gt;

&lt;p&gt;Beyond curating releases for older Drupal 8 modules, I also hope to finish Drupal 7 to 8 ports that aren&amp;rsquo;t quite finished yet. Most recently, I assisted with releases for of AddtoCal and ShareThis. My next todo is a release for Styleguide and Author Pane.&lt;/p&gt;

&lt;h2 id=&#34;join-us:d8a4001422b6491dab8fe75af22c6293&#34;&gt;Join Us&lt;/h2&gt;

&lt;p&gt;You can read more about the effort on the Drupal &lt;a href=&#34;https://www.drupal.org/blog/the-maintainers-intiative&#34;&gt;Association blog&lt;/a&gt;, or join us on &lt;a href=&#34;https://www.drupal.org/slack&#34;&gt;Drupal Slack&lt;/a&gt; at channel #maintainers.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Content Modeling in Drupal 8</title>
      <link>https://www.gregboggs.com/drupal-8-content-modeling/</link>
      <pubDate>Sun, 25 Sep 2016 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/drupal-8-content-modeling/</guid>
      <description>

&lt;p&gt;In many modern frameworks, data modeling is done by building out database tables. In Drupal, we use a web-based interface to build our models. This interface makes building the database accessible for people with no database experience. However, this easy access can lead to overly complex content models because it&amp;rsquo;s so easy to build out advanced structures with a few hours of clicking. It&amp;rsquo;s surprising how often Drupal developers are expected to be content modeling experts. Here&amp;rsquo;s a well-written &lt;a href=&#34;http://alistapart.com/article/content-modelling-a-master-skill&#34;&gt;overview of content modeling&lt;/a&gt; for the rest of us who aren&amp;rsquo;t experts yet.&lt;/p&gt;

&lt;h2 id=&#34;data-modeling-goal:c77707ea70720d0bb8cce808c1bff833&#34;&gt;Data Modeling Goal&lt;/h2&gt;

&lt;p&gt;Our goal when modeling content in Drupal is build out the structure that will become our editor interface and HTML output. We also need to create a model that supports the functionality needed in the website. While accomplishing this, we want to reduce the complexity of our models as much as possible.&lt;/p&gt;

&lt;h2 id=&#34;getting-started:c77707ea70720d0bb8cce808c1bff833&#34;&gt;Getting Started&lt;/h2&gt;

&lt;p&gt;One of the first things to do when building a Drupal site is to build content types. So, before you start a site build, start with either a content model or a detail page wire frame. This &lt;a href=&#34;https://docs.google.com/spreadsheets/d/15htLLWLguhwiuTLg_nndQNpgWVdUMy6UaR_d1q-v6iw/edit#gid=0&#34;&gt;spreadsheet from Palantir&lt;/a&gt; will help you. The home page design may look amazing, but it&amp;rsquo;s unhelpful for building out content types. Get the detail pages before you start building.&lt;/p&gt;

&lt;h2 id=&#34;why-reduce-complexity:c77707ea70720d0bb8cce808c1bff833&#34;&gt;Why Reduce Complexity?&lt;/h2&gt;

&lt;p&gt;The more content types you create, the more effort it will take to produce a site. Further, the more types you have, the more time it will take to maintain the site in the future. If you have 15 content types and need to make a site-wide change, you need to edit 15 different pages.&lt;/p&gt;

&lt;p&gt;The more pages you need to edit, the more mistakes you will make in choosing labels, settings, and formatters. Lastly, content can&amp;rsquo;t easily be copied from one type to another which makes moving content around your site harder when there are many content types. So, the first thing you&amp;rsquo;ll want to do with your content model is to collapse your types into as few types as feasible. How many is that?&lt;/p&gt;

&lt;h2 id=&#34;5-content-types-is-enough:c77707ea70720d0bb8cce808c1bff833&#34;&gt;5 Content Types is Enough&lt;/h2&gt;

&lt;p&gt;Drupal has many built in entities like files, taxonomy, users, nodes, comments, and config. So, the vast majority of sites don&amp;rsquo;t need any more than 5 content types. Instead of adding a new content type for every design, look for ways to reuse existing types by adding fields and applying layouts to those fields.&lt;/p&gt;

&lt;h2 id=&#34;break-up-the-edit-form:c77707ea70720d0bb8cce808c1bff833&#34;&gt;Break Up the Edit Form&lt;/h2&gt;

&lt;p&gt;Drupal 8 allows you to have different form displays for a single content type. With either &lt;a href=&#34;https://www.drupal.org/project/form_mode_control&#34;&gt;Form Mode Control&lt;/a&gt; or &lt;a href=&#34;https://www.drupal.org/project/form_mode_manager&#34;&gt;Form Mode Manager&lt;/a&gt;, you can create different edit experiences for the same content type without overloading the admin interface.&lt;/p&gt;

&lt;p&gt;Now that we&amp;rsquo;ve got the goal in mind and some tools to get us there, we&amp;rsquo;ll dive into the specifics of configuring field types such as hero images and drop down lists in my next post.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Drupal 8 Admin Best Practices</title>
      <link>https://www.gregboggs.com/drupal-8-admin-best-practices/</link>
      <pubDate>Sat, 05 Mar 2016 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/drupal-8-admin-best-practices/</guid>
      <description>

&lt;p&gt;Drupal sites often suffer from a less than ideal editor experience. While Drupal 8 improves on the default experience by providing inline editting, working preview, and moving the &amp;lsquo;advanced&amp;rsquo; options to the sidebar, there&amp;rsquo;s still common mistakes that will lead to poor a experience. As a part of my on-going &lt;a href=&#34;https://www.gregboggs.com/drupal8-site-building-best-practices/&#34;&gt;Drupal 8 Best Practices&lt;/a&gt; series, lets look at what we can do to build good admin interfaces.&lt;/p&gt;

&lt;p&gt;Here are a few major principles behind the admin experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use as &lt;a href=&#34;https://www.gregboggs.com/drupal-8-content-modeling/&#34;&gt;few content types&lt;/a&gt; as reasonable.&lt;/li&gt;
&lt;li&gt;Use permissions to hide unneeded options.&lt;/li&gt;
&lt;li&gt;Content should not be defined in code.&lt;/li&gt;
&lt;li&gt;Content and layouts should be editable by the editor without modifying code or css.&lt;/li&gt;
&lt;li&gt;Content should have a contextual edit link.&lt;/li&gt;
&lt;li&gt;A site should not require admin access to figure out how to edit.&lt;/li&gt;
&lt;li&gt;Content should be stored in nodes, not entities or taxonomy terms.&lt;/li&gt;
&lt;li&gt;Taxonomy can be used to apply additional page styles.&lt;/li&gt;
&lt;li&gt;Taxonomy terms should have limited fields.&lt;/li&gt;
&lt;li&gt;Vocabularies shouldn&amp;rsquo;t be too large or too deep.&lt;/li&gt;
&lt;li&gt;The editor should have easy links and dashboard.&lt;/li&gt;
&lt;li&gt;Editors should be given the Clear Cache permission.&lt;/li&gt;
&lt;li&gt;CKeditor should be configured to allow pre-selected CSS styles.&lt;/li&gt;
&lt;li&gt;Editors should have a simple tool for applying layouts to new pages.&lt;/li&gt;
&lt;li&gt;Editors should be able to apply custom CSS via a drop down.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;give-permissions-carefully:e08e9b998ecc46c7c2a1055299dbeb67&#34;&gt;Give Permissions Carefully&lt;/h2&gt;

&lt;p&gt;Clients should be given the admin password for user 1, but every user should log into the site with their own user account that has an &amp;lsquo;editor&amp;rsquo; permission set. This editor account should only be given permission to do the things they do frequently.&lt;/p&gt;

&lt;h2 id=&#34;content-should-be-editable:e08e9b998ecc46c7c2a1055299dbeb67&#34;&gt;Content Should be Editable&lt;/h2&gt;

&lt;p&gt;There&amp;rsquo;s no reason to hard-code content into your theme or PHP. Every piece of text on the page should be editable through the hover edit link over that content. If you can&amp;rsquo;t edit something without a git push, then it should be a blocking bug.&lt;/p&gt;

&lt;h2 id=&#34;content-should-be-stored-in-nodes:e08e9b998ecc46c7c2a1055299dbeb67&#34;&gt;Content Should be Stored in Nodes&lt;/h2&gt;

&lt;p&gt;This is a common mistake. Taxonomy terms are not content. They are meant to organize content. So, if you&amp;rsquo;re putting fields (especially text fields) on terms, you&amp;rsquo;re prboably making a pretty big error because taxonomy terms can&amp;rsquo;t be unpublished, promoted, or revisioned easily. If you&amp;rsquo;re putting content into custom entities, you&amp;rsquo;re probably also making a mistake because entities take a lot of extra work to get the basics that you get from nodes for free.&lt;/p&gt;

&lt;h2 id=&#34;give-editors-links-and-a-dashboard:e08e9b998ecc46c7c2a1055299dbeb67&#34;&gt;Give Editors Links and a Dashboard&lt;/h2&gt;

&lt;p&gt;Think of WordPress here, do you see your user profile when you first log in? No, you see a dashboard of content to edit and other useful information. Do the same in Drupal, redirect login to admin/content if nothing else. Give folks short cut links in their menu bar as well.&lt;/p&gt;

&lt;h2 id=&#34;did-you-clear-the-cache:e08e9b998ecc46c7c2a1055299dbeb67&#34;&gt;Did You Clear the Cache?&lt;/h2&gt;

&lt;p&gt;Lets face it, the cache clear problem from Drupal 7 is a bit worse in Drupal 8. There are many times you need to Cache Rebuild. So, give them the button.&lt;/p&gt;

&lt;h2 id=&#34;use-a-layout-system-or-layout-taxonomy:e08e9b998ecc46c7c2a1055299dbeb67&#34;&gt;Use a Layout System or Layout Taxonomy&lt;/h2&gt;

&lt;p&gt;Panels and Display Suite are popular because they are powerful, stable, uesful and easier to use than default Drupal. No matter what tools you use, give your editors easy abilitiy to apply a layout to a new page. Don&amp;rsquo;t hand code each page. Build layouts, and apply them. Even a simple &amp;lsquo;Layout&amp;rsquo; taxonomy field can allow editors to apply layouts to content.&lt;/p&gt;

&lt;p&gt;When deciding how to build things in Drupal 8, always spend some thought on how to make sure each piece of content will editted. Not only will your customers thank you, you&amp;rsquo;ll be making Drupal look good.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Drupal 8 Theming Best Practices</title>
      <link>https://www.gregboggs.com/drupal-8-theming-best-practices/</link>
      <pubDate>Sat, 05 Mar 2016 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/drupal-8-theming-best-practices/</guid>
      <description>

&lt;p&gt;The &lt;a href=&#34;https://www.drupal.org/theme-guide/8&#34;&gt;theming guide&lt;/a&gt; for Drupal 8 will get you started in the basics for theming a Drupal site. But, once you&amp;rsquo;ve learned the basics, what best practices should you be applying to Drupal 8 themes? There are &lt;a href=&#34;https://smacss.com/book/&#34;&gt;lots of popular&lt;/a&gt; methods for writing and organizing CSS. The basics of CSS, of course, apply to Drupal.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don&amp;rsquo;t get too specific&lt;/li&gt;
&lt;li&gt;Place your CSS in the header and JavaScript in the footer&lt;/li&gt;
&lt;li&gt;Organize your CSS well&lt;/li&gt;
&lt;li&gt;Theme by patterns, don&amp;rsquo;t go top down&lt;/li&gt;
&lt;li&gt;Preprocess your styles&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;use-configuration-first:250ee7ca3501796f11c5ec029d84cd82&#34;&gt;Use configuration first&lt;/h2&gt;

&lt;p&gt;When it comes to Drupal, there are some common mistakes that happen when a front end developer doesn&amp;rsquo;t know Drupal. In general, apply your classes in configuration. Do not fill your Drupal theme with custom templates like you would for WordPress. Template files, especially with Twig, have their place. But, configuration should be your primary tool. My favoriate tool for applying classes is &lt;a href=&#34;https://www.drupal.org/project/ds&#34;&gt;Display Suite&lt;/a&gt; and &lt;a href=&#34;https://www.drupal.org/project/block_class&#34;&gt;Block class&lt;/a&gt;. Panels is also good. And, &lt;a href=&#34;https://www.drupal.org/project/fences&#34;&gt;fences&lt;/a&gt; isn&amp;rsquo;t terrible.&lt;/p&gt;

&lt;p&gt;By applying your classes in configuration allows you to easily edit, reuse, and apply classes across every type of thing in Drupal. If you apply your classes with templates, it&amp;rsquo;s difficult to apply them across different types of content without cutting and pasting your code. However, don&amp;rsquo;t be afraid to use some presentational logic in your Twig templates.&lt;/p&gt;

&lt;h2 id=&#34;be-careful-what-you-target:250ee7ca3501796f11c5ec029d84cd82&#34;&gt;Be careful what you target&lt;/h2&gt;

&lt;p&gt;In Drupal, there are many times where the only selector you have that will work is an ID. If you have this problem, Don&amp;rsquo;t use it! Never, ever, ever, apply your CSS with ids in Drupal. This is true for every framework, but in Drupal it&amp;rsquo;s a bigger problem because IDs are &lt;em&gt;not&lt;/em&gt; reusable, they are hard to set, and they often change. A backend developer will not be able to apply your styles to other items without fixing your CSS for you. Don&amp;rsquo;t write CSS that you know a PHP programmer will have to rewrite because you don&amp;rsquo;t want your PHP programmer writing CSS.&lt;/p&gt;

&lt;h2 id=&#34;use-view-modes:250ee7ca3501796f11c5ec029d84cd82&#34;&gt;Use view modes&lt;/h2&gt;

&lt;p&gt;Make sure to target your styles to reusable elements. So, avoid node types because those aren&amp;rsquo;t reusable on other nodes. Instead, use view modes and configuration to apply selectors as you need them.&lt;/p&gt;

&lt;h2 id=&#34;avoid-machine-names:250ee7ca3501796f11c5ec029d84cd82&#34;&gt;Avoid machine names&lt;/h2&gt;

&lt;p&gt;This relates back to avoiding IDs. Machine names in Drupal sometimes need to change, and they are not reusable. So, don&amp;rsquo;t target them. Instead use view css, block class and configuration to apply classes to your content.&lt;/p&gt;

&lt;h2 id=&#34;don-t-get-too-specific:250ee7ca3501796f11c5ec029d84cd82&#34;&gt;Don&amp;rsquo;t get too specific&lt;/h2&gt;

&lt;p&gt;Drupal 8 markup is better, but Drupal is still very verbose. Don&amp;rsquo;t get sucked in by Drupal&amp;rsquo;s divs. Only get as specific as you need to be. Don&amp;rsquo;t replicate Drupal&amp;rsquo;s HTML in your CSS.&lt;/p&gt;

&lt;h2 id=&#34;apply-a-grid-to-drupal:250ee7ca3501796f11c5ec029d84cd82&#34;&gt;Apply a grid to Drupal&lt;/h2&gt;

&lt;p&gt;Choose a grid system that allows you to apply the grid to any markup like Singularity or Neat. While you certainly can Bootstrap Drupal. Using Bootstrap on Drupal requires a heavy rewrite of the HTML which will break contributed modules like Drupal Commerce in  obscure, hard to fix ways.&lt;/p&gt;

&lt;h2 id=&#34;use-a-breadcrumb-module:250ee7ca3501796f11c5ec029d84cd82&#34;&gt;Use a breadcrumb module&lt;/h2&gt;

&lt;p&gt;Do not write advanced business logic into your theme templates. If your theme is programming complex features, move that code to a module. Or, install modules like &lt;a href=&#34;https://www.gregboggs.com/drupal8-breadcrumbs/&#34;&gt;Current Page Crumb&lt;/a&gt;, or &lt;a href=&#34;https://www.drupal.org/project/advagg&#34;&gt;Advanced Agg&lt;/a&gt; to handle more complex functions. This isn&amp;rsquo;t WordPress, your theme shouldn&amp;rsquo;t ship with a custom version of Panels.&lt;/p&gt;

&lt;h2 id=&#34;don-t-hard-code-layouts:250ee7ca3501796f11c5ec029d84cd82&#34;&gt;Don&amp;rsquo;t hard code layouts&lt;/h2&gt;

&lt;p&gt;Use {{ content }} in your templates and let the View Modes, Display Suite, or Panels handle your layouts.&lt;/p&gt;

&lt;h2 id=&#34;don-t-use-template-php:250ee7ca3501796f11c5ec029d84cd82&#34;&gt;Don&amp;rsquo;t use template.php&lt;/h2&gt;

&lt;p&gt;If you need some &amp;lsquo;glue&amp;rsquo;, write or find a module meant for it. Drupal is built by many, many tiny modules. Learn to love it  because well-written modules are reusable, maintained for free and always improving. Custom code dropped into your theme makes for hard to maintain code.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Drupal 8 Breadcrumbs - Add the Current Page</title>
      <link>https://www.gregboggs.com/drupal8-breadcrumbs/</link>
      <pubDate>Fri, 04 Mar 2016 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/drupal8-breadcrumbs/</guid>
      <description>

&lt;p&gt;Breadcrumbs are a pain point in Drupal 7. If you don&amp;rsquo;t know how breadcrumbs are supposed to work, &lt;a href=&#34;https://www.nngroup.com/articles/breadcrumb-navigation-useful/&#34;&gt;go read this&lt;/a&gt;. The crumb should start with home and continue through to an unlinked crumb of the current page. Crumbs were implemented poorly, and breadcrumbs were difficult to modify in a module. Further, they were based on items in the menu. The breadcrumbs didn&amp;rsquo;t even allow you to edit the home title or include the current page title as an unlinked crumb. So, if you wanted breadcrumbs on a Drupal site, the first step was to choose 1 of 10 different modules to build them for you. Making matters worse, some themes decided to program breadcrumbs for you as well. If you&amp;rsquo;re stuck with a Drupal 7 breadcrumb problem, use a module I help maintain, &lt;a href=&#34;https://www.drupal.org/project/easy_breadcrumb&#34;&gt;Easy Breadcrumb&lt;/a&gt;. Trust me. I&amp;rsquo;ve got this for you.&lt;/p&gt;

&lt;h2 id=&#34;breadcrumb-improvements:24f8778d9e777b5fcc327104d840762f&#34;&gt;Breadcrumb Improvements&lt;/h2&gt;

&lt;p&gt;Drupal 8 vastly improves breadcrumbs, but core still gets them wrong. They are based on the current page path exactly like Easy Breadcrumb in Drupal 7 which is a huge improvement. So, what did they get wrong? The current page title is missing. Bummer. So close. But, not hard to fix. So, lets do it! If someone tells you to program the breadcrumbs into your theme, don&amp;rsquo;t listen to them. They are doing it wrong. Themes should work with markup and presentation. They shouldn&amp;rsquo;t implement complex, reusable logic.&lt;/p&gt;

&lt;p&gt;Drupal 8 has refactored breadcrumbs &lt;a href=&#34;https://www.palantir.net/blog/d8ftw-breadcrumbs-work&#34;&gt;making them much easier&lt;/a&gt; for developers to extend or replace. This new architecture makes it easy for us to correct Drupal 8&amp;rsquo;s breadcrumbs. Unfortunately, the code from Larry&amp;rsquo;s post is a bit out of date and doesn&amp;rsquo;t work anymore. So, lets look at the code pulled from my module Current Page Crumb module that &lt;a href=&#34;https://www.drupal.org/sandbox/gregboggs/2664958&#34;&gt;adds the current page title&lt;/a&gt; to the breadcrumb.&lt;/p&gt;

&lt;p&gt;&lt;script src=&#34;https://gist.github.com/Greg-Boggs/2338e65e6e60b8812ed7.js&#34;&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;This code extends the PathBasedBreadcrumbBuilder core class to add the current page title to the breadcrumb. Since everything else needed for the breadcrumb is handled by the parent, line 31 does almost all the work for us. From there, we just need a few lines to add the current page&amp;rsquo;s title. If you&amp;rsquo;re looking for more examples to completely replace the core breadcrumbs with a custom builder, check out the &lt;a href=&#34;https://github.com/Greg-Boggs/easy_breadcrumb&#34;&gt;Drupal 8 version of Easy Breadcrumb&lt;/a&gt; which does just that.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Drupal 8 Configuration Workflow Best Practices</title>
      <link>https://www.gregboggs.com/drupal-configuration-best-practices/</link>
      <pubDate>Thu, 18 Feb 2016 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/drupal-configuration-best-practices/</guid>
      <description>

&lt;p&gt;Don&amp;rsquo;t store site configuration in the database during development because putting configuration in the database makes configuration difficult to track in version control. Instead, &lt;a href=&#34;https://www.drupal.org/node/2416555&#34;&gt;use the file system&lt;/a&gt;! Putting configuration in a database also makes it more difficult to restore, compare, sync, deploy, modify, and review the site config. Drupal 8 uses Yml files for configuration which are a perfect format for file-based configuration. In fact, this is the only method for &lt;a href=&#34;http://www.jenlampton.com/blog/managing-backdrop-cms-config-files-git&#34;&gt;storing configuration in BackdropCMS&lt;/a&gt; because BackdropCMS uses JSON files to store site configuration. Drupal uses Yaml to store your configuration the database, but storing Yaml in files was the default method for Drupal 8 when CMI was released. Many posts have been written about the &lt;a href=&#34;http://nuvole.org/blog/2014/aug/20/git-workflow-managing-drupal-8-configuration&#34;&gt;default workflow&lt;/a&gt; for configuration. But, the promise of file-based workflow is more efficient.&lt;/p&gt;

&lt;h2 id=&#34;configuring-in-files-workflow:55311c458e6b1153a5e1b9251584a87d&#34;&gt;Configuring in Files Workflow&lt;/h2&gt;

&lt;p&gt;When Drupal stores configuration files in the file system, all you do to save your work is run a git commit because as soon as you click save in a form, Drupal writes your changes to the configuration folder. Once your work is in code and committed to version control, you can publish those on GitHub and open a pull request to review your work before deploying it to production. This workflow is possible with database configuration, but it requires extra steps with Drush that can lead to errors and differences between environments.&lt;/p&gt;

&lt;h2 id=&#34;don-t-modify-production:55311c458e6b1153a5e1b9251584a87d&#34;&gt;Don&amp;rsquo;t Modify Production&lt;/h2&gt;

&lt;p&gt;No matter which storage you use for configuration, you should not edit your configuration in production. Instead, you should install the &lt;a href=&#34;https://www.drupal.org/project/config_readonly&#34;&gt;config readonly&lt;/a&gt; module in production and make all of your changes in your local environment. Clients who don&amp;rsquo;t install Drupal locally can make configuration changes in development. Using a host like Pantheon makes it easy to deploy files from development to production.&lt;/p&gt;

&lt;h2 id=&#34;so-why-does-drupal-store-config-in-the-db:55311c458e6b1153a5e1b9251584a87d&#34;&gt;So Why Does Drupal Store Config in the DB?&lt;/h2&gt;

&lt;p&gt;I prefer keeping configuration in the file system, and BackdropCMS agrees with me. But, a few smart core developers don&amp;rsquo;t see it that way. So, why not? Drupal 8 is slow. And, some poor web hosts might allow the public to read configuration files.&lt;/p&gt;

&lt;p&gt;Early in the release cycle the install process was slow. So initially, moving configuration into the database made running the installer a bit faster. However, file-based configuration in the current release of Drupal 8 doesn&amp;rsquo;t make the installer visibly slower. So, this isn&amp;rsquo;t a problem for our workflow.&lt;/p&gt;

&lt;p&gt;The second concern with file based configuration is the desire for security through obscurity. Since we are storing configuration outside the webroot, and our web server should also be configured not to display configuration files, this isn&amp;rsquo;t an issue.&lt;/p&gt;

&lt;p&gt;Another concern was that file configuration might encourage people to edit their configuration. Since this workflow is for programmers, this is an advantage of our workflow.&lt;/p&gt;

&lt;h2 id=&#34;advantages-of-database-config-storage:55311c458e6b1153a5e1b9251584a87d&#34;&gt;Advantages of Database Config Storage&lt;/h2&gt;

&lt;p&gt;Storing configuration in the database on production has some minor advantages. So, leaving the configuration in the database on production is reasonable. Storing in the file system means you have to sync the file system in multiple web server environments.&lt;/p&gt;

&lt;p&gt;Storing config in the database allows you to attach metadata to the configuration so that you can timestamp it, assign an owner to it and create a revision workflow for configuration.&lt;/p&gt;

&lt;h2 id=&#34;how-to-enable-config-in-files:55311c458e6b1153a5e1b9251584a87d&#34;&gt;How to Enable Config in Files&lt;/h2&gt;

&lt;p&gt;The easiest way is to use the &lt;a href=&#34;https://github.com/vincenzodibiaggio/drupal8_base&#34;&gt;Drupal8-base installer&lt;/a&gt; which will enable file storage for configuration out of the box. Alternatively, you can export your site configuration from the database and then follow &lt;a href=&#34;https://www.drupal.org/node/2416555&#34;&gt;these quick steps&lt;/a&gt; to enable file-based configuration storage on an existing Drupal site.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Drupal 8 Development Best Practices</title>
      <link>https://www.gregboggs.com/drupal-development-best-practices/</link>
      <pubDate>Wed, 20 Jan 2016 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/drupal-development-best-practices/</guid>
      <description>

&lt;p&gt;These core concepts apply to Drupal 8 site builds. However, many often apply to the other major web framework from WordPress to Node projects. Many of these ideas are &lt;a href=&#34;https://www.drupal.org/best-practices&#34;&gt;documented on Drupal.org&lt;/a&gt; as well. I&amp;rsquo;m rewriting them here because I disagree with the documentation in several key areas.&lt;/p&gt;

&lt;h2 id=&#34;use-the-same-development-environment:244d6dfcff1e80befbbf583f87d790fb&#34;&gt;Use The Same Development Environment&lt;/h2&gt;

&lt;p&gt;Everyone on your team should have exactly &lt;a href=&#34;http://www.drupalvm.com/&#34;&gt;the same development environment&lt;/a&gt;. Using the same development environment ensures that the project runs exactly the same for each team member working on a project. You can do this with Vagrant, Ansible, or a Brew script.&lt;/p&gt;

&lt;h2 id=&#34;backups-put-the-database-in-code-with-cmi:244d6dfcff1e80befbbf583f87d790fb&#34;&gt;Backups? Put The Database in Code With CMI&lt;/h2&gt;

&lt;p&gt;Configuration Management in Drupal 8 allows you to quickly &lt;a href=&#34;https://www.drupal.org/documentation/administer/config&#34;&gt;store database settings in code&lt;/a&gt;. Further, content should come from a single reusable source. We use Google Docs API, others use Profiler. The key is keep your test content in a shared, predictable place.&lt;/p&gt;

&lt;p&gt;Drupal.org recommends that you backup your files and database. Since all of your code is on Github, and your database is in your code, Backups only matter in production. After a project launches, your hosting company should be providing backups. If your host isn&amp;rsquo;t taking care of this automatically for you, then switch to a web host like Pantheon, WP Engine, or Site Ground. All provide automated backups. Site Ground gives you per file recovery while Pantheon focuses on CMS backups for code/files/database in an easy to restore tool.&lt;/p&gt;

&lt;h2 id=&#34;never-hack-core-or-contrib:244d6dfcff1e80befbbf583f87d790fb&#34;&gt;Never Hack Core (or Contrib)&lt;/h2&gt;

&lt;p&gt;Don&amp;rsquo;t change the framework. Instead, write your own code as a module. Pantheon, doesn&amp;rsquo;t follow this rule, and it creates a lot of extra work for them. But, they have an entire company of developers to maintain their fork of Drupal. The rest of us should stick to the official release. This is true no matter the framework you&amp;rsquo;re in. If you hack WordPress, your project will fail during automatic updates!&lt;/p&gt;

&lt;h2 id=&#34;use-test-sites:244d6dfcff1e80befbbf583f87d790fb&#34;&gt;Use Test Sites&lt;/h2&gt;

&lt;p&gt;Your hosting company should be providing 2-3 sites for each production site automatically. If your hosting company doesn&amp;rsquo;t give you test sites, switch to Pantheon or WP Engine. You should make all your changes in your local environment first, test them locally, and then deploy them to test in production servers on a test server.&lt;/p&gt;

&lt;h2 id=&#34;use-configuration-before-code:244d6dfcff1e80befbbf583f87d790fb&#34;&gt;Use Configuration Before Code&lt;/h2&gt;

&lt;p&gt;Instead of hard coding a class or a snippet of logic into a theme, set these values in configuration and then apply the configuration with code. This allows your code to change in the future without being rewritten. This also leads us to choose high quality, well maintained modules to build our sites out of. Reusing code is one of the most basic steps in writing quality software because reusable code will have fewer bugs and more features.&lt;/p&gt;

&lt;p&gt;Instead of writing a massive &amp;ldquo;glue&amp;rdquo; module, break up functionality into reusable modules and use configuration to apply advanced functionality so that each module is more powerful and easier to modify without rewriting the code.&lt;/p&gt;

&lt;h2 id=&#34;avoid-too-many-poor-modules:244d6dfcff1e80befbbf583f87d790fb&#34;&gt;Avoid Too Many (Poor) Modules&lt;/h2&gt;

&lt;p&gt;For those of us who work on large scale Drupal sites, we&amp;rsquo;ve learned that hundreds of modules can  work together to produce an amazing, large-scale software project. When building enterprise Drupal sites, it&amp;rsquo;s more important to avoid using 1 poor module than it is to avoid 30 well built modules. This too many modules advice leads programmers to favor programming their own modules over reusing modules. However, avoiding contributed modules means you end up rewriting basic Drupal features in every new project.&lt;/p&gt;

&lt;h3 id=&#34;this-includes-your-custom-modules:244d6dfcff1e80befbbf583f87d790fb&#34;&gt;This includes your custom modules&lt;/h3&gt;

&lt;p&gt;Drupal.org only talks about contributed modules, but this too many modules advice holds for custom modules as well. The more custom modules you write, the more work it takes to maintain and modify your website. Instead of writing a large collection of custom modules, or a single giant glue module, consider publishing your modules on Github. This will encourage you to create reusable code that has configuration needed to make them reusable and future proof.&lt;/p&gt;

&lt;h2 id=&#34;follow-coding-standards:244d6dfcff1e80befbbf583f87d790fb&#34;&gt;Follow Coding Standards&lt;/h2&gt;

&lt;p&gt;You can automatically check and repair your code for Drupal with &lt;a href=&#34;https://www.drupal.org/node/1419988&#34;&gt;Code Sniffer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Up next, controversial configuration practices for Drupal 8 that will improve your workflow.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Drupal 8 Site Building Best Practices</title>
      <link>https://www.gregboggs.com/drupal8-site-building-best-practices/</link>
      <pubDate>Wed, 20 Jan 2016 00:00:00 UTC</pubDate>
      <author>me@gregboggs.com (Greg Boggs)</author>
      <guid>https://www.gregboggs.com/drupal8-site-building-best-practices/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve taught an beginners course during Drupal Global Training Days &lt;a href=&#34;https://assoc.drupal.org/global-training-day-portland-oregon-february-2016&#34;&gt;many times&lt;/a&gt; in portland, and I give students an introduction to Drupal 8 for site builders. I spend the day simplifying Drupal for new developers. But once you&amp;rsquo;re beyond the basics of the interface, there are many different ways to accomplish a task in Drupal and Drupal 8 only adds to the choices. So, if you&amp;rsquo;re a Drupal developer looking to craft easier to maintain Drupal 8 sites, this series is for you.&lt;/p&gt;

&lt;p&gt;Over the years I&amp;rsquo;ve developed many strong opinions about the best way to &amp;ldquo;drupal&amp;rdquo;. Some of my decisions aren&amp;rsquo;t actually better than alternatives, but they are patterns I&amp;rsquo;ve memorized to make my work more efficient so I can avoid getting stuck building sites. This series will cover the following topics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.gregboggs.com/drupal-development-best-practices/&#34;&gt;Drupal development best practices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.gregboggs.com/drupal-configuration-best-practices/&#34;&gt;Drupal configuration workflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.gregboggs.com/drupal8-breadcrumbs/&#34;&gt;Drupal breadcrumbs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.gregboggs.com/drupal-8-theming-best-practices/&#34;&gt;Theming best practices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.gregboggs.com/drupal-8-admin-best-practices/&#34;&gt;Editor experience basics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.gregboggs.com/drupal-8-content-modeling/&#34;&gt;Content modeling in Drupal 8&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.gregboggs.com/drupal-blocks-best-practices/&#34;&gt;What to do with blocks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Creating lists correctly&lt;/li&gt;
&lt;li&gt;Mistake-free site search&lt;/li&gt;
&lt;li&gt;Breadcrumbs in 20 minutes&lt;/li&gt;
&lt;li&gt;Permissions and roles basics&lt;/li&gt;
&lt;li&gt;Caching - don&amp;rsquo;t get this wrong&lt;/li&gt;
&lt;li&gt;JavaScript - required for every developer&lt;/li&gt;
&lt;li&gt;CSS - because we can&amp;rsquo;t make white and black websites every time&lt;/li&gt;
&lt;li&gt;Images - no one likes a slow website&lt;/li&gt;
&lt;li&gt;What you know about web fonts is wrong&lt;/li&gt;
&lt;li&gt;Responsive, adaptive sites in Drupal&lt;/li&gt;
&lt;li&gt;Coding standards&lt;/li&gt;
&lt;li&gt;Git usage for Drupal projects&lt;/li&gt;
&lt;li&gt;Cookies are dead&lt;/li&gt;
&lt;li&gt;Deploying Drupal 8&lt;/li&gt;
&lt;li&gt;Performance basics because performance helps the environment&lt;/li&gt;
&lt;li&gt;Web hosting because $5/mo isn&amp;rsquo;t enough&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And, if you don&amp;rsquo;t want to wait for me to write and publish all these best practices, feel free to &lt;a href=&#34;https://gist.github.com/Greg-Boggs/8a2661b70c4e293db585&#34;&gt;join me in this Gist&lt;/a&gt; for a sneak preview without the explanations.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>