Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 16 hours 54 min ago

Blue Drop Shop: Drupal Recording Initiative: #DrupalCampLDN, #MidCamp, #NERDSummit

Fri, 04/03/2020 - 16:12
Drupal Recording Initiative: #DrupalCampLDN, #MidCamp, #NERDSummit kthull Fri, 04/03/2020 - 09:12

March was a crazy month and I neglected my regular updates. Between touristing my first time in London, recording #DrupalCampLDN in person, flying back home just hours before the UK travel ban kicked in, adjusting to life in quarantine, working with my team to convert #MidCamp to an all-virtual conference, coordinating with #NERDSummit to also go virtual the same weekend as MidCamp, and then recovering from what was very likely Covid-19 myself (all the symptoms, but not bad enough to get tested), I had my hands full.

I'm better now and life is returning to its new normal. Below are links to three separate March #Drupal events, for your viewing pleasure:

Enjoy!

Droptica: Headless Drupal - what, when, how & where - the ultimate guide to decoupled Drupal

Fri, 04/03/2020 - 14:20
There is a lot of talk about headless CMSes and headless Drupal on the market. The customers are considering choosing this path. Some are however not certain what headless means and what are the pros and cons. When should headless Drupal be used? Let me explain.

Agiledrop.com Blog: Interview with Tiffany Farriss, CEO of Palantir: The advantage of being digital native in times of crisis

Fri, 04/03/2020 - 09:26

Our first Business Leaders interview features Tiffany Farriss, CEO of the digital consultancy Palantir.net. We spoke with Tiffany about the power of the Drupal CMS and being digital native, and discussed the current global crisis and how it necessitates a shift in the way we approach remote work. 

READ MORE

Lullabot: Clean Drupal Codebase Design with Application Services

Thu, 04/02/2020 - 15:18

Drupal 8 has allowed and fostered the use of new design patterns through both Drupal core itself and through some well-known contributed modules. Those patterns are generally oriented to dealing with Drupal the framework, as expected. But, what about your business logic?

Droptica: Build your corporate website on Drupal

Thu, 04/02/2020 - 09:21
Corporate websites are often large and packed with many different functionalities. This makes building a website very time-consuming and, consequently, expensive. At Droptica, we have developed a way to build a corporate website on Drupal faster and cheaper. From this article, you will learn how we do it.  

Mobomo: Usability and UX Can Make Space Cool for Everyone

Wed, 04/01/2020 - 22:14

Back in 2013, when I first joined Mobomo, we migrated NASA.gov from a proprietary content management system (CMS) to Amazon Cloud and Drupal 7. It goes without saying, but there was a lot riding on getting it right. The NASA site had to handle high traffic and page views each day, without service interruptions, and the new content management system had to accommodate a high volume of content updates each day. In addition to having no room for compromise on performance and availability, the site also had to have a high level of security. 

Maybe the biggest challenge, though, was laying the groundwork to achieve NASA’s vision for a website with greater usability and enhanced user experiences. If NASA’s audience all fell into the same demographic, that goal probably wouldn’t have seemed so intimidating, but NASA’s audience includes space fans who range from scientists to elementary school kids. 

Our mission was to create a mobile-first site that stayed true to NASA’s brand and spoke to all of the diverse members of its audience. A few years later, we relaunched a user-centric site that directed visitors from a dynamic home page to microsites designed specifically for them.

Making Space Seem Not So Far Away

NASA.gov includes data on its missions, past and present. To make this massive amount of data more user-friendly, we worked with NASA to design a site that’s easily searchable, navigable, and enhanced through audio, video, social media feeds, and calendars. Users can find updates on events via features such as the countdown clock to the International Space Station’s 20th anniversary. NASA.gov users can also easily find what they need if they want to research space technology, stream NASA TV, or explore image galleries. 

The NASA.gov site directs its younger visitors to a STEM engagement microsite where students can find activities appropriate for their grade level. The site also includes the NASA Kids’ Club where students can have some fun while they’re learning about exploration. For example, they can try their hands at virtually driving a rover on Mars, play games, and download activities. 

Older students with space-related aspirations can learn about internship and career opportunities, and teachers can access lesson plans and STEM resources.

How to Make it Happen

To successfully achieve NASA’s goals and manage a project this complex, we had to choose the right approach. Some website projects are tailor-made for a simple development plan that moves from a concept to design, construction, testing, and implementation in a structured, linear way. The NASA.gov project, however, wasn’t one of them.

For this website and the vast majority of the sites we develop, our team follows DevOps methodology. With DevOps, you don’t silo development from operations. Our DevOps culture brings together all stakeholders to collaborate throughout the process to achieve:

Faster Deployment

If we had to build the entire site then take it live, it would have taken much longer for NASA and its users to have a new resource. We built the site in stages, validating at every stage. By developing in iterations, and involving the entire team, we also have the ability to address small issues rather than waiting until they create major ones. It also gives us more agility to address changes and keep everyone informed. This prevents errors that could put the brakes on the entire project.

Optimized Design

NASA.gov has several Webby Awards, and award-winning web design takes a team that works together and collaborates with the organization to define the audience (or audiences), optimize the site’s navigation and usability, and strike a balance between the site’s primary purpose and its appeal. 

Mobile-First

Because NASA.gov users may be accessing the site from a PC, laptop, tablet, smartphone, or other device, it was also pivotal to use mobile-first design. Mobile-first starts by designing for the smallest screens first, and then work your way up to larger screens. This approach forces you to build a strong foundation first, then enhance it as screen sizes increase. It basically allows you to ensure user experiences are optimized for any size device. 

Scalability

NASA.gov wasn’t only a goliath website when we migrated it to Amazon Cloud and Drupal. We knew it would continue to grow. Designing the site with microsites that organize content, help visitors find the content that is most relevant to their interests, and enhance usability and UX informed a plan for future growth. 

Efficient Development Processes

DevOps Methodology breaks down barriers between developers and other stakeholders, automates processes, makes coding and review processes more efficient, and enables continuous testing. Even though we work in iterations, our team maintains a big-picture view of projects, such as addressing integrations, during the development process. 

Planned Post-Production

DevOps also helps us cover all the bases to prepare for launch and to build in management tools for ongoing site maintenance. 

What Your Business Can Learn from NASA

You probably never thought about it, but your business or organization has a lot in common with NASA, at least when it comes to your website. Just like NASA, you need a website that gives you the ability to handle a growing digital audience, reliably and securely. You’re probably also looking for the best CMS for your website, one that’s cost-effective and gives you the features you need.

Your website should also be designed to be usable and to provide the user experiences your audience wants. And, with the number of mobile phone users in the world topping 5 billion, you want to make sure their UX is optimized with mobile-first design. 

NASA’s project is also an illustration of how building your website in stages, getting input from all stakeholders, and validating and testing each step of the way can lead to great results. You also need a plan for launching the site with minimal disruption and tools that will make ongoing management and maintenance easier. 

You probably want to know you are doing everything you can to make your content appealing, engaging, and interactive. You may think NASA has an advantage in that department since NASA’s content is inherently exciting to its audience.

But so is yours. Create a website that showcases it. Not sure where to begin? Click here and we’ll point you in the right direction.

The post Usability and UX Can Make Space Cool for Everyone appeared first on .

Drudesk: Create a real estate website on Drupal with all the needed features

Wed, 04/01/2020 - 18:43

Real estate & property management businesses can reap huge profits from having a well-built website — and many of them actually do!

However, sites in this area are not built in one click. They require reliable and smooth third-party integration, excellent property categorization, advanced search, and more. This makes the choice of the CMS a responsible task. In this post, we take a tour on the features and opportunities that prove it’s a great idea to build a real estate website on Drupal.

Drupixels: Drupal 8 admin themes for next level admin experience

Wed, 04/01/2020 - 17:39
If you are one of those people who always use "Seven" as the Drupal administrator theme then this is the right time to switch. Here are some of my recent favorite theme options for the Drupal 8 administrator interface for the next level admin experience.

Gábor Hojtsy: Four ways to track a list of Drupal issues a group of you cares about

Wed, 04/01/2020 - 11:20

Drupal 9.0.0-beta2 was released this week and there are only 63 days to go for Drupal 9.0.0's release. Many product developers, distribution authors and so on are now looking at what is left to be Drupal 9 compatible and which of their dependencies are doing what where. So effectively tracking a list of drupal.org issues somewhere is on many people's minds. While you can follow issues on drupal.org that only works for your personal needs. Actually Surabhi Gokte asked me yesterday about tools for group issue tracking, and I decided to write up a quick blog post because the answers are likely useful for many people. Here are two public and two possibly private ways to track drupal.org issues. I've used each in some form throughout my years with the project and you may find some of them useful.

Public: use a drupal.org META issue

Drupal.org project developers, this is a good way to track your tasks belonging to a larger goal like Drupal 9 compatibility. Create a regular drupal.org issue for your project and use the issue link filter. [#123456] is the format to use to link to issues and get their title and even status colors represented on your issue. The only thing you need to keep an eye on is that issue summaries are cached, so as the status/title of listed issues are updated, that is not reflected on the summary. As you are likely to adjust the list as things get done and new things are discovered, the status and titles of the listed issues should get updated in the meantime. An example of this technique is [META] Requirements for tagging Drupal 9.0.0-beta1. This technique allows anyone with a drupal.org account to help maintain your list of issues.

Once you have a META issue like this for Drupal 9 compatibility, please link it from your Drupal 9 plan on your project page, see:

65 days to go until the Drupal 9 release on June 3, 2020.https://t.co/JmRQ2Cdaun project maintainers, now is a great time to indicate your Drupal 9 plans! Edit your project page and fill in the Drupal 9 plan field to help contributors help you the most effectively pic.twitter.com/QrBpZCDgiW

— The Drop is Always Moving (@DropIsMoving) March 30, 2020

Public: use Contrib Kanban

Contrib Kanban is a great service developed and ran by Matt Glaman of Centarro. You can register and create custom boards based on a list of issues, such as this kanban board for Umami's Spanish translation. Only you will be allowed to maintain your issue list but the results are shown very visually and dynamically in a kanban board style.

Public/Private: use any tool with the Drupal issue Chrome browser extension

Matthew Grasmick built the Drupal Issue Chrome browser extension which turns links to Drupal.org issues on any webpage to their colored and titled forms very much like in the META issue method. This will pull the data for issues live, but only people with the extension installed will see the titles and statuses. You can use this for private tracking or public tracking. We use it at Acquia to track some drupal.org issues through Jira tickets.

Public/Private: use a scripted spreadsheet

This method could work in any scriptable spreadsheet system. We used it extensively at Acquia with Google sheets and I believe it originates from Andrea Soper (ZenDoodles) and Jess (xjm) from several years ago. Set it up like this:

  1. Assuming an empty spreadsheet, designate a column for issue numbers. You will use this column to enter the ID of issues you want to track. Let's assume this is column E for the rest of the example. Also let's assume you use the first row for header text for the columns.
  2. Add this to F2: =IF(E2="","", regexreplace(importxml(hyperlink( concat("https://www.drupal.org/node/", E2)), "//*[@id='block-project-issue-issue-metadata']/div/div/div/div/div/text()"), "\n","")). This column will be your issue status.
  3. Add this to G2: =if(E2="","", hyperlink( concat("http://www.drupal.org/node/",E2),concat("#",E2))). This will be your issue link.
  4. Add this to H2: =if(E2="","", substitute(regexreplace(importxml(hyperlink( concat("https://www.drupal.org/node/", E2)), "//title/text()"),"\n",""), " | Drupal.org","")). This will be your issue title.

At least in Google sheets, you can hold-drag these values to fill in the rest of columns F-H with appropriate computed values. You can also apply conditional styling to status values, etc. A clear benefit of this approach is that you can assign tabular metadata to issues, like your private severity or priority information or assignments within your company as to who is planning to look into it without getting into a priority argument on the issue.

By the way it would definitely be more reliable to pull this data from the Drupal.org REST API. We used this method extensively for years at Acquia to track high priority issues leading up to Drupal core releases. However we are not currently using this method and I did not go to convert the logic from our old sheets, so improvements welcome.

These are methods I used that are still available and work fine. Do you have better ways to do issue list tracking? Let me know in the comments.

Promet Source: How to Facilitate an Innovative Remote Meeting

Tue, 03/31/2020 - 23:21
Recent challenges sparked by widespread work-at-home mandates are revealing an essential need to ensure productivity and engagement for remote meetings. Many of us are familiar with the internet meme video, A Conference Call in Real Life.  It may resonate as all too real (but still very funny!).  With the right approach, however, remote meetings can be productive, engaging, and spark creativity. 

Drupal blog: Sustaining the Drupal Association in uncertain times

Tue, 03/31/2020 - 21:16

This blog has been re-posted and edited with permission from Dries Buytaert's blog.

Today, I'm asking for your financial support for the Drupal Association. As we all know, we are living in unprecedented times, and the Drupal Association needs our help. With DrupalCon being postponed or potentially canceled, there will be a significant financial impact on our beloved non-profit.

Over the past twenty years, the Drupal project has weathered many storms, including financial crises. Every time, Drupal has come out stronger. As I wrote last week, I'm confident that Drupal and Open Source will weather the current storm as well.

While the future for Drupal and Open Source is in no doubt, the picture is not as clear for the Drupal Association.

Thirteen years ago, six years after I started Drupal, the Drupal Association was formed. As an Open Source non-profit, the Drupal Association's mission was to help grow and sustain the Drupal community. It still has that same mission today. The Drupal Association plays a critical role in Drupal's success: it manages Drupal.org, hosts Open Source collaboration tools, and brings the community together at events around the world.

The Drupal Association's biggest challenge in the current crisis is to figure out what to do about DrupalCon Minneapolis. The Coronavirus pandemic has caused the Drupal Association to postpone or perhaps even cancel DrupalCon Minneapolis.

With over 3,000 attendees, DrupalCon is not only the Drupal community's main event — it's also the most important financial lever to support the Drupal Association and the staff, services, and infrastructure they provide to the Drupal project. Despite efforts to diversify its revenue model, the Drupal Association remains highly dependent on DrupalCon.

No matter what happens with DrupalCon, there will be a significant financial impact to the Drupal Association. The Drupal Association is now in a position where it needs to find between $400,000 and $1.1 million USD depending on if we postpone or cancel the event.

In these trying times, the best of Drupal's worldwide community is already shining through. Some organizations and individuals proactively informed the Drupal Association that they could keep their sponsorship dollars or ticket price whether or not DrupalCon North America happens this year: Lullabot, Centarro, FFW, Palantir.net, Amazee Group and Contegix have come forward to pledge that they will not request a refund of their DrupalCon Minneapolis sponsorship, even if it will be cancelled. Acquia, my company, has joined in this campaign as well, and will not request a refund of its DrupalCon sponsorship either.

These are great examples of forward-thinking leadership and action, and is what makes our community so special. Not only do these long-time Drupal Association sponsors understand that the entire Drupal project benefits from the resources the Drupal Association provides for us — they also anticipated the financial needs the Drupal Association is working hard to understand, model and mitigate.

In order to preserve the Drupal Association, not just DrupalCon, more financial help is needed:

  • Consider making a donation to the Drupal Association.
  • Other DrupalCon sponsors can consider this year's sponsorship as a donation and not seek a refund should the event be cancelled, postponed or changed.
  • Individuals can consider becoming a member, increasing their membership level, or submitting an additional donation.

I encourage everyone in the Drupal community, including our large enterprise users, to come together and find creative ways to help the Drupal Association and each other. All contributions are highly valued.

The Drupal Association is not alone. This pandemic has wreaked havoc not only on other technology conferences, but on many organizations' fundamental ability to host conferences at all moving forward.

I want to thank all donors, contributors, volunteers, the Drupal Association staff, and the Drupal Association Board of Directors for helping us work through this. It takes commitment, leadership and courage to weather any storm, especially a storm of the current magnitude. Thank you!

Srijan Technologies: Considering Decoupled Drupal? Things You Need to Know

Tue, 03/31/2020 - 15:30

With our clients, we are continuously experiencing a growing demand for delivering more interactive web applications and personalized content across platforms.  

ThinkShout: ThinkShout’s COVID Commitment: Four Ways to Stabilize Your Digital Platform

Tue, 03/31/2020 - 15:00

The global COVID-19 pandemic has affected each of us in profoundly personal, and yet somehow deeply shared, ways. Facts on the ground have changed so quickly, and so dramatically, that we find ourselves overcome with a huge range of emotions and needs: caring for immediate families, worrying about loved ones, reaching out to neighbors, and obsessing over news from every corner of the globe. And while our personal concerns may remain focused on community-based ways to get through this crisis together, our ability to serve our clients is paramount — if you’re reading this, we’re likely talking about your organization.

The time we are living through has only served to amplify how essential your work is, and we know first hand how much your teams are stepping up in the face of this crisis to move it forward. You deserve partners that can rise to meet the challenge alongside your team.

Our Response

As a B Corp committed to supporting mission driven organizations, ThinkShout has always strived to live the values that you fight for day in and day out, and those values are most essential during times of duress, to ensure that we don’t lose our way when navigating a crisis. Rather than just assuming business as usual, we surveyed our team to understand their needs in this new era, and made necessary adjustments to ensure that we can find our new balance between work and life, and continue to operate at full capacity to serve your needs. We are also adjusting to our new shared virtual reality by creating free webinars, blog posts, and best practices for anyone in our community to learn from, including a new series on Equitable Digital Connections. We want you to know that we are thinking about your evolving needs every day. It is our job to stay ahead of emerging best practices, to learn from the efforts of similar organizations, and ensure that you have the digital tools and support to continue your work.

Tangible Ways to Deepen Digital Engagement

This is a moment where innovation and creativity are required from each of us as we respond to today’s crisis in a way that not only meets the challenge, but also helps shape the future to be more just and equitable for the communities you serve.

Our current situation presents two clear new opportunities:

  • Deepen engagement with audiences by exploring new ways to use current platforms to leverage existing offerings.
  • Expand engagement with audiences by exploring new-to-your-organization platforms and engagement tactics.

This applies to everything from strategic communications and campaigns, to how knowledge products are distributed.

Our immediate recommendation is to lean into exactly what makes your organization unique — your core product offering — and then consider how every digital tool at your disposal can better communicate its relevance and importance. Now is the time to embrace concepting, creating, and implementing equitable and accessible digital platforms and engagement tools. In this hopefully short era where all communication is virtual, it is our responsibility to bridge the digital divide both between organizations that have the capacity to engage with their core audiences and those that don’t, as well as within organizations as they work to best leverage digital systems to support all programs, partnerships, and mission-critical efforts. For organizations focused on social good, this is even more essential.

We are actively engaged with all current ThinkShout clients to discuss how the systems and strategies you’re already using can flex to meet this moment. Partnering with your organization as strategic, creative, and technical experts is our very reason for existence.

Where To Focus: Stabilizing Your Digital Platform

ThinkShout is investing deeply across four critical areas that all of our partners should prioritize at this time. As more services become digital-only (and perhaps in ways that are more permanent than initially thought), we need to be extra vigilant to ensure that content is accessible and designed for all audiences. If you don’t currently have a direct contact at ThinkShout, please reach out to learn more about how we’re expanding core offerings in:

  • Accessibility: Now is a great time to ensure that your digital products are accessible to everyone. Auditing top content, analyzing your options, and building a phased roadmap are steps you can take today.
  • Audiences: How are your products and content informed by human insights? New approaches to developing behavior-based personas can result in better outcomes organizationally and for the individuals you serve.
  • Ecosystems: How do your digital platforms—audience-facing and administrative alike—serve your organization? Where are redundancies and otherwise inefficient systems hindering streamlined experiences for your users or efficient processes for your team? Are you considering new tools and need to evaluate how they fit into the full ecosystem?
  • Full-Stack Content Strategy: When it comes to a platform that’s optimized for search and social, the little things are the big things. If you haven’t already, now is the time to audit and update your platform’s URL structures, metadata, keywords, and page titles for social and search.

Social distancing does not imply a lack of social connection. To the contrary, it makes the latter more essential than ever. People crave connection. A sense of belonging — and purpose. You can provide that to all of us as we sit, isolated, searching for meaning in the chaos and, most of all, a way to help. Let us know if we can help you make those connections that our society so urgently needs.

Agiledrop.com Blog: The most important thing in an agency partnership

Tue, 03/31/2020 - 13:23

In this post, we'll discuss the most important element to an agency partnership: communication. We'll explain why it's so essential, provide examples of good and bad communication practices, and finish with some tips for more effective communication with partners.

READ MORE

Specbee: How to create a Custom Drupal 8 Theme in 9 Simple Steps

Tue, 03/31/2020 - 13:06
How to create a Custom Drupal 8 Theme in 9 Simple Steps Neslee Canil Pinto 31 Mar, 2020 Top 10 best practices for designing a perfect UX for your mobile app

Drupal 8 gives developers and site owners the flexibility of creating bespoke components that can be put together to build compelling digital experiences. Themes are Drupal’s design blocks that represent the visual appearance of a website. Drupal 8 comes with choices of core themes and third-party themes. However, if none of them cut it for you, you should probably be looking at Drupal 8 custom theme development. With Drupal 8 custom themes, you can tailor-fit your design to the exact requirements.

Drupal 8 provides Bartik as the frontend theme, but if you need a Drupal 8 custom theme then you can create your own Drupal 8 theme development, thus improving your Drupal theming skills. The easiest way to really understand Drupal 8 theme development is to practice and create one from the ground up.

Getting Started with Custom Drupal 8 Theme Development

Let’s get started with creating a Drupal 8 custom theme for our Drupal website.
STEP 1 : First, we need to create a custom theme under ‘web/themes/custom’ folder. We will name the folder as custom_theme.  

   
      Create Custom Drupal 8 Theme folder

STEP 2 :Next, we will need to create an info.yml file. We need to specify the basic keys for it. Let us specify it over here.


       Create an info.yml file CODE: name: Custom Theme type: theme description: 'Custom Theme for My Website.' package: Other core: 8.x

STEP 3 : Now,let’s create alibraries.yml file to specify all the libraries we need (CSS AND JS) for our custom Drupal 8 theme.We will also create CSS and JS directory and its files to link it in here. We are going to name the library as global-styling.


       Create a libraries.yml file CODE: global-styling: version: 1.x js: js/script.js: {} css: theme: css/style.css: {}

STEP 4 : After creating the libraries.yml file, we need to link it to our theme.For this, we are going to add it in the info.yml file which will then apply it to the whole theme. 
 


        Linking the libraries.yml with the custom Drupal 8 theme CODE: libraries: - custom_theme/global-styling

So, the key will be libraries and path will be the theme name - ‘custom_theme’ / library name - ‘global-styling’.

STEP 5 : Next, we need to inherit the ‘Base Theme’.In our case, we will inherit ‘classy’ theme which is a Drupal core theme. So, the key will be base theme in info.yml. 


        Inheriting the Base theme - classy CODE: base theme: classy

STEP 6 : Now, we will define the‘regions’ for our theme. In info.yml, we have to define under the ‘regions’ key.

 
         Defining 'regions' CODE: regions: branding: Branding navigation: Main navigation search: Search featured: Featured content: Content right_sidebar: Right sidebar footer_first: Footer First footer_second: Footer Second footer_third: Footer Third footer_bottom: Footer Bottom

Under ‘regions’ key you can define your regions for the custom theme. Here,
branding: Is the id of the region which should be lowercase letter.
Branding: Is the name of the region which can be Uppercase letter.

STEP 7 : After we have defined our regions for our custom theme, we need to override page.html.twig to grab our ‘regions’instead ofthe classy theme’s. We will create templates/system directory under which we will create the page.html.twig.


       Override the page.html.twig CODE: <header aria-label="Site header" class="header" id="header" role="banner"> {{ page.branding }} {{ page.navigation }} {{ page.search }} header> <section class="featured" id="featured" role="complementary"> {{ page.featured }} section> <section class="main" id="main"> <main aria-label="Site main content" class="content" id="content" role="main"> {{ page.content }} main> <aside class="right--sidebar" id="sidebar" role="complementary"> {{ page.right_sidebar }} aside> section> <footer aria-label="Site footer" class="footer" id="footer" role="contentinfo"> <div class="footer--top"> {{ page.footer_first }} {{ page.footer_second }} {{ page.footer_third }} div> <div class="footer--bottom"> {{ page.footer_bottom }} div> footer>

 In page.html.twig, we will create html structure for our regions. As you see in{{ page.branding }} –Here,

page - Is the key to render ‘regions’ in the page

branding- Is the region which we have defined in info.yml file.

So now, we have created our regions and rendered it in the page, now let’s start.

Step 8 : Go to Appearance in your Drupal site.You can see your custom theme present in the Uninstalled themes section.


        Uninstalled Themes Section

You need to click ‘Install and set as default’ option to install your theme in the site.

After it is installed,go to Structure -> Block Layout.Your Custom Theme will appear under the Block Layout.

​​​​​​  

You will see a link for ‘Demonstrate block regions (Custom Theme)’.Click on the link.You can see all the regions that you had declared in theinfo.yml and added in page.html.twig
 


       Regions added in info.yml and page.html.twig

Step 9 :Now, you need to apply styles in the CSS for each region as per your design.We will use cssin this case;You can even use SCSSif you’d like. Just inspect the branding region - you shouldsee the region class and then add the CSS to that class. 

 

Add CSS in style.css as per your requirement.

.header{ display: flex; justify-content: space-between; padding: 10px; }

.header.region { padding: 5px; }

.header.region-branding { flex: 0 1 20%; }

.header.region-navigation { flex: 0 1 50%; }

.header.region-search { flex: 0 1 30%; }

.region.block-region { padding: 15px; }

.featured{ padding: 40px 20px; background-color: indianred; }

.main{ padding: 50px 0; display: flex; justify-content: space-between; }

.main.content { flex: 0 1 65%; }

.main.right--sidebar { flex: 0 1 30%; }

.footer--top { display: flex; justify-content: space-between; padding: 10px; }

.footer--top .region { padding: 5px; }

.region-footer-first, .region-footer-second, .region-footer-third { flex: 0 1 30%; }

 

The Result: Your Drupal 8 Custom Theme is ready!

 

If you need to write any hooks or create suggestions for your twig file, you could add the .theme file in your custom theme (shown below).


      Adding the .theme file

Custom theme development gives you freedom to design themes that are bespoke to an organization. Here’s hoping this brief guide helps you get started with developing Drupal 8 custom themes for your future projects. Looking for expert Drupal developers to help you build unique custom Drupal themes for your next Drupal 8 website? Contact us now.

Drupal Planet Shefali ShettyApr 05, 2017 Subscribe For Our Newsletter And Stay Updated Subscribe

Leave us a Comment

  Shefali ShettyApr 05, 2017 Recent Posts Image How to create a Custom Drupal 8 Theme in 9 Simple Steps Image How to Create a Covid-19 Response Announcement on your Drupal 8 website Image A Peek into the UI/UX Universe (with examples) Want to extract the maximum out of Drupal? TALK TO US Featured Success Stories

Know more about our technology driven approach to recreate the content management workflow for [24]7.ai

link

Find out how we transformed the digital image of world’s largest healthcare provider, an attribute that defined their global presence in the medical world.

link

Discover how a Drupal powered internal portal encouraged the sellers at Flipkart to obtain the latest insights with respect to a particular domain.

link

Srijan Technologies: Drupal 9 is Backward Compatible - Why Should You Care?

Tue, 03/31/2020 - 08:26

As Drupal 9 release has already become a buzzword in the Drupal community, people have been anticipating its new features since long alongside the after-effects of end of lives for Drupal 7 & 8 in 2021.

Kalamuna Blog: Web Design for Disaster - Part 1: Alert Your Users

Mon, 03/30/2020 - 19:26
Web Design for Disaster - Part 1: Alert Your Users Mike McCaffrey Mon, 03/30/2020 - 10:26

As the world navigates through a public health crisis, and everyone is forced to respond to unprecedented conditions, it is a good time to evaluate how well your website is working to communicate urgent information to your stakeholders, and how it might be improved going forward. 

The designers and developers at Kalamuna have helped many organizations prepare and respond to emergency situations, and in this series of posts, we are going to share the lessons we have learned and the best practices we are now recommending to our clients.

Categories Articles Community Drupal Guidance Responsive Design Security Author Mike McCaffrey

Web Omelette: Automated testing in Drupal 8

Mon, 03/30/2020 - 16:07

This is an excerpt from my book: Drupal 8 module development - second edition. Do check out the rest of the book/chapter to see how you can write automated tests in Drupal 8.

Automated testing is a process by which we rely on special software to continuously run pre-defined tests that verify the integrity of our application. To this end, automated tests are a collection of steps that cover the functionality of an application and compare triggered outcomes to expected ones.

Manual testing is a great way to ensure that a piece of written functionality works as expected. The main problem encountered by most adopters of this strategy, especially those who use it exclusively, is regression. Once a piece of functionality is tested, the only way they can guarantee regressions (or bugs) were not introduced by another piece of functionality is by retesting it. And as the application grows, this becomes impossible to handle. This is where automated tests come in.

Automated testing uses special software that has an API that allows us to automate the steps involved in testing the functionality. This means that we can rely on machines to run these tests as many times as we want, and the only thing stopping us from having a fully-working application is the lack of proper test coverage with well-defined tests.

There's a lot of different software available for performing such tests and it's usually geared toward specific types of testing. For example, Behat is a powerful PHP-based open source behavior testing framework that allows the scripting of tests that mirror quite closely what a manual tester would do—interact with the application through the browser and test its behavior. There are other testing frameworks that go much lower in the level of their testing target. For example, the PHP industry standard tool, PHPUnit, is widely used for performing unit tests. This type of testing focuses on the actual code at the lowest possible level; it tests that class methods work properly by verifying their output after providing them with different input. A strong argument in favor of this kind of testing is that it encourages better code architecture, which can be (partly) measured by the ease with which unit testing can be written for it.

We also have functional or integration tests which fall somewhere in between the two examples. These go higher than code level and enlist application subsystems in order to test more comprehensive sets of functionality, without necessarily considering browser behavior and user interaction.

It is not difficult to agree that a well-tested application features a combination of the different testing methodologies. For example, testing the individual architectural units of an application does not guarantee that the entire subsystem works, just as testing only the subsystem does not guarantee that its individual components will work properly under all circumstances. Also, the same is true for certain subsystems that depend on user interaction—these require test coverage as well.

Testing methodologies in Drupal 8

Like many other development aspects, automated testing has been greatly improved in Drupal 8. In the previous version, the testing framework was a custom one built specifically for testing Drupal applications—Simpletest. Its main testing capability focused on functional testing with a strong emphasis on user interaction with a pseudo-browser. However, it was quite strong and allowed a wide range of functionality to be tested.

Drupal 8 development started with Simpletest as well. However, with the adoption of PHPUnit, Drupal is moving away from it and is in the process of deprecating it. To replace it, there is a host of different types of tests—all run by PHPUnit—that can cover more testing methodologies. So let's see what these are.

Drupal 8 comes with the following types of testing:

  • Simpletest: exists for legacy reasons but no longer used to create new tests. This will be removed in Drupal 9.
  • Unit: low-level class testing with minimal dependencies (usually mocked).
  • Kernel: functional testing with the kernel bootstrapped, access to the database and only a few loaded modules.
  • Functional: functional testing with a bootstrapped Drupal instance, a few installed modules and using a Mink-based browser emulator (Goutte driver).
  • FunctionalJavaScript: functional testing like the previous, using the Selenium driver for Mink that allows for testing JavaScript powered functionality.

Apart from Simpletest, all of these test suites are built on top of PHPUnit and are, consequently, run by it. Based on the namespace the test classes reside in, as well as the directory placement, Drupal can discover these tests and know what type they are.

PHPUnit

Drupal 8 uses PHPUnit as the testing framework for all types of tests. In this section, we will see how we can work with it to run tests.

On your development environment (or wherever you want to run the tests), make sure you have the composer dependencies installed with the --dev flag. This will include PHPUnit. Keep in mind not to ever do this on your production environment as you can compromise the security of your application.

Although Drupal has a UI for running tests, PHPUnit is not well integrated with this. So, it's recommended that we run them using the command line instead. Actually, it's very easy to do so. To run the entire test suite (of a certain type), we have to navigate to the Drupal core folder:

cd core

And run the following command:

../vendor/bin/phpunit --testsuite=unit

This command goes back a folder through the vendor directory and uses the installed phpunit executable (make sure the command finds its way to the vendor folder in your installation). As an option, in the previous example, we specified that we only want to run unit tests. Omitting that would run all types of tests. However, for most of the others, there will be some configuration needed, as we will see in the respective sections.

If we want to run a specific test, we can pass it as an argument to the phpunit command (the path to the file):

../vendor/bin/phpunit tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php

In this example, we run a Drupal core test that tests the UrlGenerator class.

Alternatively, we can run multiple tests that belong to the same group (we will see how tests are added to a group soon):

../vendor/bin/phpunit --group=Routing

This runs all the tests from the Routing group which actually contains the UrlGeneratorTest we saw earlier. We can run tests from multiple groups if we separate them by a comma.

Also, to check what the available groups are, we can run the following command:

../vendor/bin/phpunit --list-groups

This will list all the groups that have been registered with PHPUnit.

Finally, we can also run a specific method found inside a test by using the --filter argument:

../vendor/bin/phpunit --filter=testAliasGenerationUsingInterfaceConstants

This is one of the test methods from the same UrlGeneratorTest we saw before and is the only one that would run.

Registering tests

There are certain commonalities between the various test suite types regarding what we need to do in order for Drupal (and PHPUnit) to be able to discover and run them.

First, we have the directory placement where the test classes should go in. The pattern is this: tests/src/suite_type, where suite_type is a name of the test suite type this test should be. And it can be one of the following:

  • Unit
  • Kernel
  • Functional
  • FunctionalJavascript

So, for example, unit tests would go inside the tests/src/Unit folder of our module. Second, the test classes need to respect a namespace structure as well:

namespace Drupal\Tests\[module_name]\[suite_type]

This is also pretty straightforward to understand.

Third, there is a certain metadata that we need to have in the test class PHPDoc. Every class must have a summary line describing what the test class is for. Only classes that use the @coversDefaultClass attribute can omit the summary line. Moreover, all test classes must have the @group PHPDoc annotation indicating the group they are part of. This is how PHPUnit can run tests that belong to certain groups only.

So now that we know how to register and run tests, let's order the book and start by looking at unit tests first.

Droptica: How to find and hire the best Drupal agency

Mon, 03/30/2020 - 11:41
There are almost a million websites built on Drupal. The websites built on Drupal are growing ever bigger. In fact, Drupal is the main CMS contender if you want to build a big website and don't want to use expensive proprietary platforms. Website generators, headless CMSes and Digital Experience Platforms architected by massive corporations, all are built on Drupal. Drupal, however, is a complex framework.

DrupalEasy: DrupalEasy Podcast 227 - Pivoting to Virtual Midcamp with Avi Schwab

Mon, 03/30/2020 - 04:23

Direct .mp3 file download.

Mike speaks with Avi Schwab, one of the organizers of MidCamp, on how the organizing team quickly shifted from an in-person camp to a virtual camp. In addition, Chris Weber also has three new change records for us.

URLs mentioned DrupalEasy News Sponsors Subscribe

Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.