Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 39 min 17 sec ago

OpenLucius: So, yeah.. we built OpenLucius 2.0 (Drupal 9)

Wed, 06/03/2020 - 08:46

In 2014 we were proud to release OpenLucius 1.0 on Drupal 7. Since that time a lot has happened in the (Drupal) world as well as with our agency.

We had to drop support in 2018 unfortunately, but we always had the intention to build a new version; that would encapsulate all learnings from the past. Early 2020 we were finally able to start developing the new version in Drupal 8; first release is now available in Drupal 9.

What is OpenLucius

OpenLucius aims to be a lean and fast social, culture building, productivity platform; ready to use after installation. The goal is to be easy-to-use software that helps your people to:

Evolving Web: Introducing Drupal 9, the Next Evolution of a Proven Web Platform

Wed, 06/03/2020 - 06:46

Today, we're excited to celebrate the launch of the most stable and mature version of Drupal to date. Drupal 9 is the culmination of the work of thousands of contributors around the globe, collaborating to create an innovative platform that's designed for everyone to use.

What's really exciting about Drupal 9 is that it represents the work of 4 and a half years of steady work since Drupal 8 was released. Rather than a single cycle of new features added all at once, features have been released steadily since Drupal 8.0. And now all those features are already tested, stable, and ready-to-use.

What Has Changed Since Drupal 8?

Since November, 2015, there have been 8 feature releases for Drupal 8 that progressively and steadily satisfy more and more requirements for ambitious web projects. Features like Media and Layout Builder have been fully integrated into an already rich content model. This really takes Drupal to the next level compared to other options in the CMS ecosystem and means that Drupal can adapt to the digital information design needed by each individual project.

For those who upgrade to Drupal 9, continuous improvements will continue to be added in the same way. This first release of Drupal 9 represents an upgrade to the underlying technology, but there's no radical change to how Drupal works. Upgrading is important because it means that you can keep benefiting from the innovation, while staying secure and stable.

Why Should I Use Drupal 9?

In broad strokes, there are 3 main reasons to use Drupal 9:

Drupal 9 Enables Innovation

Drupal is open source, but it's also open in that it doesn't lock you into one set of technology solutions. It can adapt to your marketing tools of choice, the devices you want to push data to, and the future use cases that are coming down the road. By simply having a strong content architecture, Drupal sites are easier to extend and build on. Features will continue to be added via regular feature releases (Drupal 9.1, 9.2, etc) so you'll benefit from improvements that are added as the web evolves.

Drupal 9 Prioritizes Ease-of-Use

The thing that I'm most excited about in Drupal 9 is how much easier it's going to be for content editors to use. Layout Builder provides drag-and-drop page building. The Claro theme provides a more accessible and streamlined admin interface. Content Moderation provides workflows that are actually adapted to content editors' needs. And that's what's great about Drupal's its flexibility empowers you to create an experience that's just right for your content editors. Ease-of-use and content editors experience is at the top of the list for Drupal 9 feature releases. Expect to see continuous improvement to the experience of using Drupal.

Drupal 9 is Mature

Drupal 9 isn't a risky proposition or bleeding edge. It's been tried and tested by not just a small set of proprietary users, but a global community of users including countless government and healthcare organizations. It's built on a solid technology stack that's been tested and optimized for use cases where security, performance, and accessibility are of the utmost priority. Its multilingual capabilities are truly built into the core, not an afterthought as with so many other content management systems.

Open source development means that features are built and tested from the perspective of many. Our community truly takes pride in the fact that Drupal is secure, fast, and accessible. These aspects of Drupal are not an afterthought, but part of the core values of the community that are reflected in the software. It's in our culture to care about our users, and that culture stays with us in Drupal 9.

Dive into Drupal 9!

So since today is launch day, you have some homework to do:

When Drupal 9.1 is released, you'll start seeing new features added and you won't want to miss out on the train to the future, so get started upgrading today.

If you need help with your upgrade, we'd love to hear from you. And if you want to learn how to run an upgrade yourself, Evolving Web will be scheduling our first Drupal 9 Training soon. Subscribe to our Learn Drupal Newsletter to find out as soon as it's announced.

+ more awesome articles by Evolving Web

Drupal Association blog: Statement of Support and Taking Action

Wed, 06/03/2020 - 02:09

For our team at the Drupal Association, the events of the past week have once again emphasized the severity and violence of racism that communities experience in the United States and across the world every day.

Amidst the COVID-19 pandemic, where communities of color are disproportionately affected, seeing racial turmoil unfold is particularly painful and difficult to witness. We stand with all communities of color and all people across the globe in condemning racism, racist behavior and all abuses of power. We grieve for the Black community, which has endured another unspeakable tragedy in a long history of injustice.

Drupal is global in scale, reach and opportunity. It takes many contributions, from many diverse contributors to thrive. Drupal is about standing up for what could be and for promoting hope through access. As such, our community adheres to a set of values and principles. Of particular importance is our value to “treat each other with dignity and respect” emphasizing that we do not tolerate intolerance toward others. It is time to live our values out loud seeking first to understand, then to be understood.

The Drupal Association values equity, diversity and inclusion, and we recognize we still have work to do to create meaningful change. Here are the ways in which we are encouraging our team to take action. We are sharing in hopes that you will take action, too.

If you have resources to share or organizations to highlight, please post them on social media using the hashtag #DrupalBetterTogether so that we may compile a comprehensive list for our community.

In the coming weeks and months, you will learn more about the programs we are putting into place to take action. Our Drupal Community is truly Better Together, and together we will accelerate our ability to affect positive change. Now is the time to raise our voices, not to silence them.

Promet Source: Drupal 9 Has Dropped! What To Do Now

Tue, 06/02/2020 - 21:13
The long-anticipated drop of Drupal 9 has arrived. This marks an exciting step in the evolution of Drupal. A migration from Drupal 8 to Drupal 9 is not as complex and cumbersome as previous version releases. Drupal 8 to Drupal 9 will be an upgrade that is more akin to a point release. If you are not prepared to upgrade to Drupal 9 immediately, you are not alone.

Jacob Rockowitz: Sharing Webforms...Anywhere!!!

Tue, 06/02/2020 - 20:11

The Webform for Drupal 8 is built upon Drupal's Form API (FAPI); the building, validating, and submission handling of a form relies on Drupal's backend code. Drupal, and most content management systems, are moving toward a decoupled approach where the backend content authoring tool is separate from the front-end presentation layer. Until now, there was no easy way to decouple a webform from Drupal's presentation layer.

Decoupled Drupal and sharing Webforms

A decoupled approach for the Webform module means that Drupal would handle the backend form builder and the submission processing. In contrast, the user-facing input form would be rendered using a front-end framework like Angular, React, and Vue.js. In the Drupal community, people are experimenting with decoupling webforms by exposing webform elements using a JSON schema or REST API, and then rendering the input form using Gatsby with React. The biggest limitation of this approach is recreating 80+ webforms elements with complex business logic as React native components. For me, this feels like an overwhelming challenge; it requires rebuilding Drupal's Form API and the Webform module's presentation layer from scratch. Stepping back from this challenge/problem, the goal which everyone is working towards is being about to use a webform outside of a Drupal website.

Embedding a Webform using an iFrame

A widespread solution to embedding external content within another website is to use an Inline Frame element ().

In the webforms specific use case, an iframe allows a webform to be nested in any HTML page. With this approach in mind, I started to research...Read More

Evolving Web: How to Use Alt Text and Accessible Images to Create Maximum Reach

Tue, 06/02/2020 - 16:01

Images play an important part in media and advertising. They can be very effective in creating a mood or feeling and are great at emotionally connecting with people. Websites are no exception. However, not all users are able to see the images on a website or may need accommodations to do so. In a hyper visual world, where images and visual cues like colour are used to represent a brand, elicit emotion in consumers and create strong psychological cues, it can be easy to forget that not every client can see. This is why it's important to ensure that the thoughts and messages those visual cues communicate are still being broadcast to users who cannot see or have poor vision.

One important way to do this is to make sure the semantic text of the website communicates the same tone and evokes the same message that the graphics and visual cues do. A second, equally important way is to ensure that any messages contained in the images are clearly communicated to users who are visually impaired. 

Not All Users Have the Same Needs

Users who are visually impaired do not all have the same needs. Some users might be able to see the images but cannot make out the different colours due to colour blindness. They need images with enough contrast to distinguish the different parts of the image without relying on colour. This is especially true for graphs and charts, so be sure to distinguish the components using patterns or hashing, in addition to colour. Another reason to consider contrast within your images is that you want them to be clear if printed in black and white. There is nothing worse than a logo that becomes illegible every time it's printed out in black and white. 

Other users with poor vision are able to see and distinguish colours but need to zoom in to read the content. They need images with a high enough resolution that don't become pixelated or distorted when enlarged. This also helps ensure your website still looks good when displayed through a projector. 

Lastly, some users cannot see images at all and need to access websites through a screen-reader. They rely on alternative (alt) text to tell them what the images represent. Describing images with alt text isn't always straightforward, so let's look at how to do this effectively. 

How to Use Alt Text Effectively 

Alt text allows users who cannot see and use a screen-reader to absorb the information that images provide. Even your company logo in the top-left corner should have an alt text to signal to users where they are. Since the alt text is going to be read aloud by a screen reader, be as succinct as possible and avoid numbers or symbols. A common mistake is to forget that the screen reader will already indicate that something is an image, so just write 'duck playing soccer' instead of  'image of a duck playing soccer.' There's a general guideline that each alt text should be less than 140 characters, so save the extra info for a caption, or a link to another site. 

Alt text is also widely used by search engines (think Google Image search), so writing thoughtful descriptions will not only help accessibility, but will also drive traffic to your site. Just don't be tempted to pump your alt texts with a ton of keywords as site visitors using screen readers (and Google too) will be annoyed. 

Generally, there are different types of images, each requiring a different alt text approach.

1. Functional Images


Functional images perform an action, such as opening a link. They should have alternative text that describes the action that happens when the user clicks that link. For example, "Search this page" for a magnifying glass that indicates a search function. Often, a brand logo is used as a functional image that returns users to the home page. In this case, the alternative text should indicate where the logo links to and can include the brand name as well: "Evolving Web Home."

2. Informative Images


Informative images convey short information or concepts that can usually be expressed in a short phrase, such as "Young children playing baseball at City Park." Sometimes, an image is used more to convey a feeling or concept. For example, a picture of an all-smiling family camping at a campground can have alternative text such as "Families love camping at The Eager Beaver's Dam Good Campsite."

3. Complex Images


Complex images, such as graphs or diagrams, need to have alternative text that conveys the data or same information. In this case, it's best to provide a full-text alternative to the data contained in the graph. Also, for users who have trouble distinguishing colour, always be sure to indicate different parts of a graph or chart using distinctions besides colour, such as hashing. For further explanations on how to describe different types of complex images, The Diagram Centre is a great resource. 

4. Images Containing Text

Images containing text should include the text included in the image in their alternative text. However, other than the logo, as a general rule avoid embedding text in images or using images as text. 

5. Decorative Images

" data-entity-type="file" data-entity-uuid="34acfb7e-fae1-4cd9-8160-d7edaad8ea50" src="https://evolvingweb.ca/sites/default/files/inline-images/05-decorative-images.jpg" />
Decorative images are the final type of image. These images serve no purpose other than to just look nice. They are the one exception to always having alternative text to your images and should have no alternative text. 

If you want further details on how to write alt text, this blog breaks it down pretty well. 

One Minute Summary

It might seem complicated at first, but images are one of the easier website components to make accessible. The key is to have appropriate alt text. As a quick recap, for the images themselves, make sure all images have a high enough contrast so they can be interpreted without colour and are zoomable. Next, use alt text to label them appropriately. Images that do an action should indicate the action in the alt text whereas those that simply demonstrate something should describe what they show. Images which are purely decorative should have no alt text. 

Follow these tips and everyone will be able to enjoy your site. And if you need more guidance, join our upcoming Web Accessibility training

+ more awesome articles by Evolving Web

Acro Media: 5 Risks to Your Business in Running End of Life Software

Tue, 06/02/2020 - 16:00

End of life (EOL) software is a very real problem. Whether your business is using ecommerce and customer relationship management systems across multiple platforms or relying on basic scheduling and accounting software, you will at some point reach a technological expiry date.

When a system reaches end of life, the creator/owner of the software/technology no longer delivers support services for the product. That can include technical support, hardware or software upgrades, bug fixes, security patches, or feature development. In short, the system gets abandoned by its owner. 

Software becoming obsolete can cause all sorts of problems. Here are five risks to your business in running EOL software:

1. Security

End of life technology receives no security updates. No bug fixes. No patches. No monitoring. Your technology is dead in the eyes of the creator. That means your security is completely compromised, not only for the platform that is EOL, but also potentially for any others that connect to it.

At minimum, your system can be accessed and your content or records edited, stolen, or deleted. If you have any user data, financial data, or sensitive information, you could have a major problem. The monetary and reputational cost could kill your business.

A survey of 2,600 CIOs across the U.S. found that the number one concern was keeping systems and information secure. If you take no action on EOL systems, you are essentially condemning yourself to failure in that regard. 

2. Maintenance

Just because the software maker is no longer supporting the software doesn't mean you have no options for supporting it going forward. There are agencies that specialize in supporting older technology. But that support doesn’t come cheap, and integrations into other systems require even more time-consuming and expensive workarounds. 

As a general rule, maintaining EOL software is complex and expensive. Is it really worth not moving due to fear of change?

3. Liability

If you hold people's information and data, you are responsible and liable for it. Using systems that are not properly supported to keep that data secure means you can be prosecuted for not complying with government or industry regulations. Fines, shutdowns, and even jail time are potential outcomes from not acting responsibly with the information you have been entrusted with. 

4. Reliability

If you were a taxi driver, would you willingly drive an old car that is no longer maintained and has sporadic issues? Of course not. That’s because your livelihood relies on the economics of your vehicle. 

But that is what you are doing if you continue with EOL software. Old software is less reliable and more prone to failure. Even if you are able to find people who will work on it for you, it's going to cost a lot more money, because it takes much more time and expertise. 

And if it connects to other systems, be prepared for much more testing time to ensure that all the variables across all systems are working properly. Because there's no guarantee that they will.

5. Cost

EOL software costs more, whether it’s through lost/stolen data, updating and maintaining with third parties, legal liabilities, or lost revenue from downtime or issues. 

The sticker price on a new system can sometimes seem large. But the security gained from having well maintained and supported systems is critical. 

One side benefit from moving from EOL software is the opportunity to review your company's entire technology stack/architecture. We often see that when going through the cost and process of moving systems: Other changes are made to improve workflows and processes. These often result in net savings for the business. So not only do they spend less, they eliminate their security risks and improve workflows.

If you have software moving towards EOL, it's essential to look at not only replacing the single system, but also assessing your whole technology landscape for opportunities to make larger improvements.

Conclusion

Ultimately, EOL technology is costly to your business in multiple ways. Most technology providers give lots of notice when one of their products is going to be unsupported. That gives you time to assess your options and determine the path you should take. 

In some cases, it's migrating to a new version or equivalent product. In others, it’s reorganizing your company's whole technology structure and moving away from a system that was holding you back. 

To determine if your system has reached EOL and plan for your next move, check out our End of Life Playbook.

Specbee: Programmatically creating a block in Drupal 8 – A brief tutorial

Tue, 06/02/2020 - 14:38
Programmatically creating a block in Drupal 8 – A brief tutorial Suresh Prabhu 02 Jun, 2020 Top 10 best practices for designing a perfect UX for your mobile app

Blocks are an integral part of any Drupal website. They are chunks of content that can be placed in various regions and can be easily moved around the web page. Blocks can contain simple text, forms, or some complex logic.
The Block module is now a core module in Drupal 8 that can be enabled. Sometimes installing other core or contributed modules can make blocks available. Although these blocks can be modified to suit the layout, complete flexibility and customization can be only achieved with Custom blocks.
We can create a custom block programmatically or via the Drupal Interface. Here, we will be creating a block programmatically and enabling it through the admin interface.

How to Create a Custom Block in Drupal 8?

Let us get started with creating a custom block in Drupal 8 in a few simple steps -


1. Create a module

To create a custom block, it is necessary to create a “.info.yml” file in modules/custom directory. Here a custom directory does not exist. You will need to create it. Create a directory named “custom” under the module directory. And under “modules/custom” create a directory called “block_example”. This directory name will be the name of the module created.
Inside this folder that you just created, create a “.info.yml” file. Here it will be block_example.info.yml as the module name is block_example. Within this file, enter the following contents:
 


After creating the folder and file with the above content, go to the dashboard and enable the module you just created. The name of the module here is Block Example.

 

2. Create a Drupal Block Class

Now to define the logic for the block, we must define the Drupal block class. We need to follow PSR-4 standard code for custom blocks. The php class of the block is placed under modules/custom/block_example/src/Plugin/Block directory. Create this folder structure and create a class named ExampleBlock.php under the Block directory.
This file should contain:

  • Annotation metadata - This will help to identify the Block created. To know more about Annotation check Annotations-based plugins.
  • Annotation contains:
      The “id” which is a unique, machine readable ID for the custom block created.
      The “admin_label” defines the human readable name of the custom block which is displayed in the admin interface.          

The ExampleBlock extends Blockbase class which will provide generic block configuration form, block settings, and handling of user defined block visibility settings.

Here we are displaying a markup in the block.

3. Enable the Block to display the content
  • After saving the file to enable the block, go to admin > Structure > Block layout.
  • Click on Place block under the region the block should be displayed. Here the block is placed in ‘Sidebar second’.
  • After clicking on Place block, search for the custom block you just created.
     

 

  • Click on Place block for the block you want to display. The configuration window opens where you can set the configuration as per requirement.

Here the block is displayed for every user's front page. After the configuration is changed as per the requirement, click on Save block and come back to the site.

The Drupal 8 custom block created is now visible in the region where the block is placed.

4.Methods used in the class created for custom blocks
  • build() : This method will render a render-able array. In this example a simple markup is returned. Even the complex contents like forms and views can also be returned.
  • blockAccess() :  This method defines a custom user access logic.

                       • The AccessResult class is called here. 
                       • The method allowedIfHasPermission() checks if the current user has thepermission to view this content or not.
 

  • blockForm() : This method allows to define a block configuration form. 

 

  • blockSubmit() : This method is used to save the configuration defined in the previous method blockForm(). 

     

  • blockValidate() : This method validates the configuration form of the block. 

     

 

Although the concept of blocks is the same in Drupal 7 too, the implementation in Drupal 8 is quite different. The code for each block is well organized in a separate class. In Drupal 7, all blocks related code were written in “.module” file, which can get messy. I hope you found this tutorial useful and helps you get started with creating your own custom blocks. We offer expert Drupal development services at Specbee and can help you build digital experiences that drive results. Contact us now.

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

Leave us a Comment

  Shefali ShettyApr 05, 2017 Recent Posts Image Programmatically creating a block in Drupal 8 – A brief tutorial Image Drupal 8 Custom Module development – A beginners Guide Image Top Questions about Adobe Experience Manager 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

Agiledrop.com Blog: Interview with Pivale's Darren Fisher: Baptism of fire at DrupalCon

Tue, 06/02/2020 - 09:00

We spoke with Darren Fisher, digital transformation consultant, designer and front-end developer at the UK company Pivale. Find out how Darren transitioned from working in the print industry to web design and development, and what are the things he most loves about Drupal. 

READ MORE

Evolving Web: The New Drupal Logo: Just in Time for Drupal 9

Mon, 06/01/2020 - 16:59

As you might have heard, Drupal 9 is being released this Wednesday. There is a lot to celebrate, you’ll find evidence of Drupal 9 celebrations as teams prepare to upgrade to the new version of our favorite content management system. However, there is no distinct Drupal 9 logo to go with this release. Instead, a new evergreen logo will be used to represent all versions of the Drupal project and software. And there’s a good reason for that.

The Original Drupal "Logo"

To provide some context, when I first used Drupal 12 years ago, Drupal had a single recognizable branding element: the famous Druplicon. Not a true logo, the Drop icon is a well-loved community symbol: a character that has been adapted a thousand different ways in typical open-source fashion, just like Drupal itself. If you’ve ever attended a Drupal event, you’ve seen variations on this original drop. Although loved by Drupalers, it’s a bit of a curiosity to outsiders and probably too grass-roots for marketers and digital directors trying to select a solution for their next corporate website.

A selection of Druplicons from druplicon.org

The Drupal Wordmark

When Drupal 7 was released, a word mark came along around the same time. As Drupal gained wide adoption by large organizations, the wordmark provided consistency and an easily recognizable symbol of the Drupal project, used by insiders and outsiders alike.

The Drupal 8 Logo

When Drupal 8 was released, a stylish drop emerged to represent this new version of the software. With the cut-out of an 8 inside a drop, the logo is simpler and sleeker than the Druplicon. We used it in pitch decks and product comparisons, and having a more mature logo allowed us to visually represent the modernization in the underlying technology of Drupal 8.

The Drupal Evergreen Logo

If you, like me, tend to have a dozen or so Drupal.org tabs open at a time, then you’ve already seen the new Drupal evergreen logo. Our friend the Druplicon has morphed into a sleeker droplet. The observant among you will recognize its origins in the DrupalCon brand. The drop shape is the same, stripped of the hexagonal treatment, and  showing the light Drupal blue color.

And that slight shift in branding is just like Drupal 9 itself. Drupal 9 is an upgrade of the underlying technology (Symfony and its related libraries), so that Drupal can keep innovating. It’s a big deal that migrating to Drupal 9 is no big deal.

Drupal 9.0 is a huge improvement on Drupal 8.0, so much effort has been put into carefully scheduling and releasing feature after feature over the last 4 years. Each feature releases since Drupal 8 came out has progressively made Drupal more powerful and more mature. And for those who upgrade to Drupal 9, features like a new admin UI, a new default theme, and other continuous improvements will continue to be added. Just like a logo that is tweaked until it’s right, it’s a platform that keeps innovating and improving. The Drop is always moving.

A Community Effort

Like everything else, the creation of the Drupal Evergreen Logo was a community effort. Huge thanks to Sixeleven for creating the logo (generously donating their time during the peak of Italy's COVID crisis). Thanks to Gábor Hotsjy for pushing the project ahead along with all things Drupal 9, and to the Drupal Association for making it happen. Let me know if you want to get involved in the Promote Drupal Initiative to help with similar projects in the future!

Show Me the Logo!

You can download the new logo, the wordmark, and the Druplicon from the Drupal Media Kit and take a look at Drupal’s Brand Book and marketing materials from the Promote Drupal initiative.

+ more awesome articles by Evolving Web

Tag1 Consulting: RELAXed Web Services and extending JSON:API - part 2

Mon, 06/01/2020 - 15:59

Decoupled Drupal has been a hot topic in the Drupal community for several years now, and there are now many projects implementing decoupled Drupal architectures, as well as a bevy of content...

Read more preston Mon, 06/01/2020 - 08:53

qed42.com: Layout Builder Asset Injector module

Mon, 06/01/2020 - 14:46
Layout Builder Asset Injector module Body

Drupal 8's Layout Builder allows content editors and site builders to easily and quickly create visual layouts for displaying content. Users can customize how content is arranged on a single page, or across types of content, or even create custom landing pages with an easy to use drag-and-drop interface. Our recently contributed module - The Layout Builder Asset Injector module is definitely not a replacement for theming, but it provides site administrators with a quick and easy approach. The Layout Builder Asset Injector module allows site builders to add CSS and JS to the layout builder blocks. 

| Benefits 
  • It allows you to inject CSS and JS within the layout builder blocks without the need to add it in the codebase.

  • Append unique CSS and scripts specific to layout builder blocks

  • It provides content editors with basic knowledge of CSS and JS to style their individual layout builder blocks and add short JS scripts to modify the behaviour.

  • Instead of adding CSS and JS on a page level, this module allows you to inject them on an individual block.

| CSS Injector

CSS Injector allows administrators to inject CSS into the page output based on configurable rules. It's useful for adding simple CSS tweaks without modifying a site's official theme.

| JS  Injector

JS Injector allows administrators to inject JS into the page output based on configurable rules. It's useful for adding simple JS tweaks without modifying a site's official theme.

Note: Block class will be appended automatically to each CSS.

For example when we add a CSS as given below:

h1.node__title {   background-color:red; } It will automatically append the class of the block for which CSS is added once saved. .block-field-blocknodepagebody h2.node__title{    background-color:red; }  

| How does it work? 
  • Enable the Layout Builder Asset module

  • After you enable the module, enable the layout option from the manage display section as shown below:

  • Under Layout Options, check both ‘Use Layout Builder’ and ‘Allow each content item’ options.

  • Click on the Add Block where you have CSS and JS text field (text area)

To understand Layout Builder in detail refer  https://www.drupal.org/docs/8/core/modules/layout-builder

  • You can add your styling and scripts under the CSS and JS fields respectively

  • To make the styling and scripts specific to a block, add classes under the Classes text field. This class should be unique so as to reflect scripts and styling specific to a block.

  • On adding the CSS and JS and saving the configuration, it will automatically prefix the CSS with a custom class added.

Note: You don't need to add it manually.

  • Upon saving the configuration, it creates a block specific unique file in the backend.

  • In the frontend, you can see the CSS applied to the respective block.

| Implementing the Layout Builder asset injector module 

Click here for the steps to install the Layout Builder asset injector module - https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules

| Developer support

Kishor Kolekar: https://www.drupal.org/u/kishor_kolekar

Harshal Pradhan: https://www.drupal.org/u/hash6

Abhishek Mazumdar: https://www.drupal.org/u/abhisekmazumdar

Hardik Patel: https://www.drupal.org/u/hardik_patel_12

Naresh Bavaskar: https://www.drupal.org/u/naresh_bavaskar

| Module download link 

https://www.drupal.org/project/layout_builder_asset

| Alternative module links 

https://www.drupal.org/project/asset_injector

https://www.drupal.org/project/layout_builder_styles

 

Kishor Kolekar Mon, 06/01/2020 - 18:16

qed42.com: Clear Field Values Module: Drupal 8

Mon, 06/01/2020 - 10:40
Clear Field Values Module: Drupal 8 Body

While trying to build a form, I found that it would be useful to have a one-click/touch option to clear text field values instead of selecting all the text and removing it. Even though this appears like a small issue, solving this would make users life easy! This was the driving force behind creating the Clear Field Values module for Drupal 8. The Clear Field Values module provides a way to clear data in the text field values with a single click/touch.

| Clear Field Values module

This module adds a button to clear text field values in one click/touch and provides two options at present, one is a simple cross button and the other is using font awesome icons.

| Benefits 
  • Helps clear the entire input field without having to delete the whole text manually 

  • Clears a pre-suggested input present in the input field, that the user does not require.

| Implementing the Clear Field Values module

Follow these steps to configure the Clear Field: 

  1. Go to /admin/config/clear-field/settings steps

  2. Enable Clear Field by selecting the checkbox 

  3. Next, select the type of Button:

    1. Simple X 

    2. Fontawesome for all generic fields

  4. You can then add the text and tooltip which you need to add along with icon or keep it empty if not required.

  5. Add classes for the text field elements where you need the cross button to be visible.

Step 1 : Move to  Settings page /admin/config/clear-field/settings  Step 2: Enable Clear Field Checkbox

Select Type of Button

  1. Text along with X for all

Selecting the above option would add X(cross) with text beside the text field

  1. Font Awesome for all fields generic

Enable FontAwesome module https://www.drupal.org/project/fontawesome and you can add the cross button

Default values for the text of the icon and tooltip are Clear Field & Clear field value which can be overridden.

Default values for the Classes are form-text form-email separated by a space.

For a custom-form add custom classes defined under element’s attributes under Classes field.

| Developer support

This module is supported by 

  1. Harshal Pradhan https://www.drupal.org/u/hash6

  2. Kiran Kadam https://www.drupal.org/u/kirankadam911

| Module download links

https://www.drupal.org/project/clear_field

https://www.drupal.org/project/clear_field/releases/8.x-1.x-dev

Do send in your feedback around this module! We would love to hear from you. 
 

Reference: https://www.geeksforgeeks.org/html-clearing-the-input-field/

 

Harshal Pradhan Mon, 06/01/2020 - 14:10

Droptica: Why Drupal Is The Best Headless CMS

Mon, 06/01/2020 - 10:15

I recently wrote an extensive article about a headless CMS. I discussed the pros and cons of building a headless and listed some considerations you should take into account when deciding whether headless is right for you.
Today I want to focus on why you should really consider Drupal if you need a headless CMS.

Headless CMS space is growing

The headless CMSes space is exploding in recent years. This is mostly due to 2 factors:

  1. The emergence of javascript frameworks which allow for the creation of superb user experiences. React, Angular and Vue are great in building these, but they require a backend for content storage.
  2. The publish once, push everywhere idea which is adopted along with the rise of the Omnichannel brand presence and the advent of Digital Experience Platforms. Content now has to be distributed via all the channels in which Drupal is present.

Both these movements are helping the headless CMSes thrive. This happens in 2 ways:

  1. The existing CMSes are adopting to the headless approach. This happened with Drupal API first initiative and inclusion of JSON:API and services modules into Drupal core. Wordpress followed along with making the REST API available.
  2. New entrants to the market, which are focusing only on providing the headless version. These are both - open source and proprietary solutions or mixtures of both worlds.

As a product owner, you have a plethora of options to choose from. It might be difficult to drill down and make the right decision. If I were to recommend the options, I would suggest going with Drupal most of the time. Here is why.

Drupal is mature and is a fully ready headless CMS

If you intend to invest in a headless CMS that will power your websites for the foreseeable future, you have to select a solution that is stable and solid. One which has a clear roadmap of development and will be still relevant and supported in years to come.

Drupal has started the API first initiative years ago and the community was working very hard to get it done. The Services and JSON:API modules are now in Drupal core. They receive the full support of the core project team. You can be sure that they will be available with each drupal release and that they will be working correctly.

Drupal itself is a very mature CMS. Powering over 1 million websites it is backed by a large community of developers. If you chose Drupal you get an enterprise-level solution which will be well supported in the future. 

The contrib space offers a massive amount of modules which extend the base functionality. You can build very custom solutions just by combining already existing code, without having to write too much yourself. This is a huge benefit compared to other, less popular solution on the market.

For more information about drupal benefits, check out the why Drupal page.

The REST API is ingrained into Drupal

In Drupal, the REST API is not an addition plastered on to Drupal as an add-on. The APIs are deeply ingrained into the CMS. Interacting with the API is the same as interacting with the CMS via the browser. This brings magnificent benefits:

  • All the Drupal goodies work out of the box. The fine-grained permissions mechanisms, the workflows, relations, processes etc are executed in just the same way if you request data via API or try to access it via the frontend.
  • All modules which extend Drupal, will work with services (if they are applicable of course). 
  • You can create your own modules and they will work the same way for the headless part of the CMS and for the frontend part.

Thanks to deep integration, the REST APIs are extendable and the way they work can be altered. The best example is the JSON:API extras module and the services module. These both are great examples of how much power the developers have over how they want the APIs to operate. These are of course just examples. Your development team will be able to tailor Drupal to your needs.

JSON:API module is JSON:API compliant

It is worth mentioning that the JSON:API provided by Drupal strictly follows the JSON:API specification. Thanks to this, any developer familiar with the standard can very quickly start working with the API without having to learn a lot of Drupal.

But I want GraphQL

Here you go. The GraphQL module from contrib allows you to expose graphql schemas from Drupal. The module is used by over 1000 websites. It is thoroughly tested by the community. This is another example of how mature Drupal is. Even a solution which is not “the default one” gets a massive amount of usage, testing and support. 

Great tutorials and examples

As with every large community, and especially the Drupal one, a lot of effort is put to educate and help new users onboard. Drupal boasts of a fantastic and very vibrant community, which is always ready to suggest solutions and lend a hand. 

When it comes to the headless approach to building a CMS this is the case in particular. There even is a Drupal distribution built to be an API first, headless CSM. It is called contenta CMS. Contenta is an interesting starting point for building a headless Drupal. It is also a fantastic repository of examples and approaches to real-life requirements. The contenta GitHub account is full of examples in practically any available frontend technology.

Vast vendor support

Last but not least, it is important to be sure that your headless CMS can get the support it needs. Drupal stands out here as well. With a wide selection of drupal agencies which provide drupal support, you will always be able to find expertise to run build and maintain project. If you choose a inch, new solution, the number of vendors will be limited and so might be the expertise. 

Summary

If you are about to invest in a headless CMS, you should choose a robust, stable working solution with great support and flexibility. Even though there are many options out there, the majority does not offer the guarantee of stability and predictability, because they are too young. 

Drupal stands out as the robust flexible, API fist solution with a mature community, predictable release cycles, a plethora of contributed modules and a clear vision into the future.

Drupal should at least get to the shortlist of the options you are considering.
 

Microserve: Drupal 9 has launched! 

Mon, 06/01/2020 - 09:41
Drupal 9 has launched!  Lauren Howells Mon, 06/01/2020 - 07:41

The day has come for Drupal 9 to launch. Hurrah! But what does this actually mean for you and your website?

In 2015, the last most recent major release of Drupal was launched: Drupal 8. The launch of Drupal 8 saw fundamental architectural changes, which meant that upgrades from older versions meant a complete rebuild of your website and a full content migration. 

The launch of Drupal 8 however, was a little different. As part of this rebuild, came Drupal’s continuous innovation model. 

Srijan Technologies: Entity Share - A cost-effective solution to manage multisite content

Mon, 06/01/2020 - 07:37

Many organizations are running into the challenge of managing content on their multiple websites for gaining centralized control and ensuring its secure flow.

DrupalEasy: DrupalEasy Podcast 231 - Michael Meyers (Yjs and Goose), Dane Powell (Acquia BLT)

Sun, 05/31/2020 - 15:34

Direct .mp3 file download.

Ryan Price talks with Michael Meyers about Yjs (an open-source project that enables real-time, collaborative editing similar to Google Docs) and Goose (a load testing tool), after that, Mike Anello talks with Dane Powell about Acquia BLT.

URLs mentioned DrupalEasy News 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.

Kalamuna Blog: Emergency Landing Page Best Practices (Web Design for Disaster, Part 2)

Sat, 05/30/2020 - 00:15
Emergency Landing Page Best Practices (Web Design for Disaster, Part 2) Mike McCaffrey Fri, 05/29/2020 - 15:15

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

The team at Kalamuna has helped many organizations prepare and respond to emergencies, and in this series of posts, we are sharing research and lessons from our previous projects and the best practices we are now recommending to our clients.

Categories Community Drupal Guidance Mobile Responsive Design Security Strategy User Experience Author Mike McCaffrey

Drupal core announcements: Announcing the Bug-Smash community initiative!

Fri, 05/29/2020 - 23:58

Happy to announce we're attempting to kick off a new community initiative primarily focused on fixing and closing bugs.

We're hoping to

  • reduce the total amount of open core bugs
  • reduce the average age of open bugs
  • increase the number of closed bugs
  • mentor those looking to get move involved in contributing to core
  • give community members from countries in the Eastern Hemisphere the chance to participate in a core initiative in their local time zone.
We need you!

Resolving core bugs requires a wide range of skills - we're looking for volunteers to join us who can help with one or more of the following tasks:

  • Triaging and classifying bugs
  • Writing good bug reports, with steps to reproduce
  • Writing patches to resolve the bug
  • Writing automated test-cases to confirm the bug, and that it is resolved
  • Reviewing patches, through the lens of each of the core gates e.g. technical, accessibility, performance, backwards-compatibility, documentation, internationalization and usability.
  • Communicating with sub-system experts in order to gain sign off on non trivial changes
  • Writing documentation as required
  • Manual testing of the patch
  • Communicating any changes via blog posts, change records, release note snippets etc.
  • Coordination and management

If you are are looking to get involved - come join us on Slack in the #bugsmash channel.

We will meet asynchronously in the #bugsmash slack channel fortnightly on a Tuesday at 0400 UTC which maps to the following times:

  • 2pm AEST
  • 12 noon AWST, CST
  • 4pm NZST
  • 9.30am IST
  • 6.00am CEST
  • 5.00am BST
  • 8.00pm PST
  • 11.00pm EST