Skip to content
Menu
Open World News Open World News
  • Privacy Policy
Open World News Open World News

Category: News

Specbee: How to Create Dynamic Layouts with Layout Builder, CTools, and View Modes

Posted on March 28, 2023 by Michael G
How to Create Dynamic Layouts with Layout Builder, CTools, and View Modes
Mustakim Farooqui
28 Mar, 2023

Having an attractive and engaging website is crucial to success in today’s digital age. One way to achieve this is by using dynamic layouts that allow for flexibility and creativity in designing your website. Fortunately, Drupal provides a powerful set of tools that can help you create dynamic layouts with ease.

In this article, we will explore how to use Layout Builder, CTools, and View Modes to build custom layouts for your Drupal website. Whether you’re a beginner or an experienced Drupal developer, this guide will provide you with the knowledge and skills to take your website design to the next level.

New to Layout builder? Explore more articles to gain a deeper understanding.

Specbee: How to Create Dynamic Layouts with Layout Builder, CTools, and View Modes

Leveraging Entity View Modes and CTools Module for Dynamic Design Strategies

When using the Drupal layout builder, we may develop a number of strategies to maximize its effectiveness. Contributed modules like paragraphs, views, CTools, and others can be used in conjunction with Layout builder to develop these strategies. We can also make use of the content types’ entity view mode. We have discovered that employing entity view modes is an excellent strategy for sites that require the most versatility.

In this lesson, we’ll discover a technique that makes use of the entity view modes and the CTools module’s features. To accomplish this, a set of components will be created. It is similar to component-based design methodologies.

We’ll make use of Drupal’s Basic Page content type, which is available right out of the box. To render various items, we will add new view modes for the Basic page content type. Using the CTools module’s capability, we will render an entity as a block in the layout builder. Using view modes, we will add a banner image to the homepage of our website.

Installing CTools module

In the Drupal framework, Chaos Tools, sometimes known as CTools, is a significant and well-liked module. It is essentially a collection of APIs and technologies that construct libraries for other modules to use and make code easily accessible to developers. Several Drupal modules rely on it in one way or another.

In order to create the view modes pattern for the Basic page content type, we will first need the Chaos tools suite (ctools) module.

Install the CTools modules by using the composer command shown below:

composer require 'drupal/ctools:^4.0'

To use the module, go to Extend and install the module.

The following command can also be used to install the module using the drush command line as an alternative:

 

drush pm:enable ctools

extend

View Modes Pattern

After installing the module, enable the layout builder under “Manage Display” for the Basic page content type.

Manage display

 

We need two things in the basic page content type in order to apply the view modes pattern.

  • Banner Field
  • Banner View mode

Banner Field:

Add an image banner field using the setup below to the basic page content type:

banner settings

Banner View mode:

To add a view mode, go to Structure > Display modes > View modes > Add view mode

display mode

 

Create a view mode called Banner Image for content entity type:

choose viewadd new content

This page will now display the newly created view mode: Structure > Display Modes > View modes

view mode

 

After defining the view mode, we must enable it for our Basic page content type. To do so, navigate to the content type’s “Manage Display” section and enable the view mode “Banner Image” under the “Custom display settings” section, as shown below.

Manage display

 

After enabling the view mode, you’ll note that our custom view mode is now accessible to use in the content type’s “Manage Display” area.

display image banner

Next, go to Banner Image view mode and disable all fields except the Banner field that we defined earlier.

view banner

Following this step, to add the Banner image to the homepage, overrides the default layout of the basic page content type by clicking on the Layout tab displayed in the homepage’s primary tabs.

home page

 

In the following steps, we’ll add the Banner Image view mode and show the picture using the ctools block. To achieve this, click “Add Block” and a panel with a list of the available blocks and fields to add to the layout will appear on the right side of the page.

•  Choose Entity View (content) to add the view mode.

entity view

 

•  Add the block after configuring it and choosing the “Banner Image” view mode.

configure block

 

Our home page’s final layout will appear as follows after adding the Banner Image view mode:

edit layout

Final Thoughts

This is how you can use Drupal layout builder and CTools module to apply the view modes pattern for various use cases in accordance with your needs.  While this is a powerful approach, it can be difficult to keep track of all the changes you make and the various view modes. To facilitate better control over your view modes, consider leveraging modules like CTools Exportables or Features that enable you to export and import your view modes with ease.

From dynamic layouts to advanced functionality, we have the Drupal skills and expertise to bring your vision to life. Contact us today to learn more about how we can help you build the website of your dreams.

Author: Mustakim Farooqui

Meet Mustakim Farooqui, Drupal Developer, and our own Chess master. He dreams of visiting Europe and enjoys reading novels and tech articles. When not working, you can find him with a game of chess, solving puzzles, or checking out new Linux distros. Give him a strong cup of coffee and he’ll set sail for anything!

Drupal
Drupal Module
Drupal Development
Drupal Planet

 

Recent Blogs

Image
Dynamic layouts with layout builder

How to Create Dynamic Layouts with Layout Builder, CTools, and View Modes

Image
Career story

A Journey of Persistence – Shreeganesh’s Career Story

Image
Integration and testing in drupal

What You Need To Know About Continuous Integration and Testing in Drupal

Want to extract the maximum out of Drupal?
TALK TO US

Featured Case Studies

Itsoc logo

IEEE Itsoc

Upgrading the web presence of IEEE Information Theory Society, the most trusted voice for advanced technology

Explore

Semi 252x91-01.png

Semi

A Drupal powered multi-site, multi-lingual platform to enable a unified user experience at SEMI

Explore

gsh logo

Great Southern Homes

Great Southern Homes, one of the fastest growing home builders in the US, sees greater results with Drupal

Explore

View all Case Studies

Middleware to block ChatGPT created by ChatGPT :)

Posted on March 28, 2023 by Michael G
https://github.com/railsjazz/chat_gpt_blocker is a bit funny project, assuming it was created by ChatGPT. Some websites should be ready to block access from the bot.

CVE-2023-28755: ReDoS vulnerability in URI

Posted on March 28, 2023 by Michael G

We have released the uri gem version 0.12.1, 0.11.1, 0.10.2 and 0.10.0.1 that has a security fix for a ReDoS vulnerability.
This vulnerability has been assigned the CVE identifier CVE-2023-28755.

Details

A ReDoS issue was discovered in the URI component. The URI parser mishandles invalid URLs that have specific characters. It causes an increase in execution time for parsing strings to URI objects.

The uri gem version 0.12.0, 0.11.0, 0.10.1, 0.10.0 and all versions prior 0.10.0 are vulnerable for this vulnerability.

Recommended action

We recommend to update the uri gem to 0.12.1. In order to ensure compatibility with bundled version in older Ruby series, you may update as follows instead:

  • For Ruby 2.7: Update to uri 0.10.0.1
  • For Ruby 3.0: Update to uri 0.10.2
  • For Ruby 3.1: Update to uri 0.11.1
  • For Ruby 3.2: Update to uri 0.12.1

You can use gem update uri to update it. If you are using bundler, please add gem "uri", ">= 0.12.1" (or other version mentioned above) to your Gemfile.

Affected versions

  • uri gem 0.12.0
  • uri gem 0.11.0
  • uri gem 0.10.1
  • uri gem 0.10.0 or before

Credits

Thanks to Dominic Couture for discovering this issue.

History

  • Originally published at 2023-03-28 01:00:00 (UTC)
  • Update Affected versions at 2023-03-28 02:00:00 (UTC)

Posted by hsbt on 28 Mar 2023

Automate container and pod deployments with Podman and Ansible

Posted on March 28, 2023 by Michael G

Podman and Ansible are even better together for enabling automation and orchestration of container and pod lifecycles. Read More at Enable Sysadmin

The post Automate container and pod deployments with Podman and Ansible appeared first on Linux.com.

Windows needs to stop showing tabloid news

Posted on March 28, 2023 by Michael G
Did you know that pigs eat humans “far more often than people expect?” If not, surely you must have heard the important, breaking news that a priest “died” in 2016, went to Hell briefly and returned to inform the rest of us that demons like to play Rhianna’s Umbrella song over and over again. If you aren’t aware of these important news stories then maybe you haven’t been spending enough time using Windows’ search box and widgets section, which at least for me, are filled to the brim with tabloid trash headlines. The stories come courtesy of Microsoft’s MSN content network, which syndicates content from hundreds of web publishers: some reputable, some less so. Full disclosure: Our parent company, Future Plc, has a syndication agreement with MSN and many of its sites, including Tom’s Hardware, occasionally have articles appear on the network. What’s problematic here, though, is not that MSN syndicates content but that it often pushes the equivalent of the Weekly World News table of contents right into the Windows operating system where it can be hard to avoid. Actions have consequences. If you choose to use Windows, you choose to get fed garbage all over your operating system in the form of ads and tabloid news.

Mah e Ramzan Aur Khawateen – Naimat e Iftar – Shan e Ramzan – 27th March 2023 – ARY Qtv

Posted on March 27, 2023 by Michael G
Naimat e Iftar – Mah e Ramzan Aur Khawateen – Shan e Ramzan

Topic: Islam Ka Falsafa e Ibadat

Host: Syeda Nida Naseem

Guest: Prof. Sadia Ansari, Imtiyaz Javed Khakvi, Sehar Azam

Subscribe Here: https://bit.ly/3dh3Yj1

#ShaneRamzan2023 #NaimateIftar #MaheRamzanAurKhawateen

Official Facebook: https://www.facebook.com/ARYQTV/
Official Website: https://aryqtv.tv/
Watch ARY Qtv Live: http://live.aryqtv.tv/
Programs Schedule: https://aryqtv.tv/schedule/
Islamic Information: https://bit.ly/2MfIF4P
Android App: https: //bit.ly/33wgto4
Ios App: https: https://apple.co/2v3zoXW

Dia Mundial do Teatro: conheça os profissionais que trabalham nos bastidores

Posted on March 27, 2023 by Michael G
Marckson de Moraes e Hélio Cereja contam que para construir uma narrativa é necessário um conjunto de profissionais do teatro, o corpo técnico, sem eles as emoções não seriam ressaltadas no palco

Miami: Alcaraz et Sabalenka en contrôle

Posted on March 27, 2023 by Michael G
Les favoris du Masters 1000 de Miami, l’Espagnol Carlos Alcaraz et la Bélarusse Aryna Sabalenka, se sont facilement imposés dimanche, et l’Américain Taylor Fritz et le Danois Holger Rune ont validé leur ticket et s’affronteront en huitièmes de finale.

How to Create a Blog in 2023 | Most Important Blogger Settings | Full Details in Telugu…

Posted on March 27, 2023 by Michael G
#saikumartechy #bloggingtutorial #howtostartablog

How to Create a Blog in 2023 | Most Important Blogger Settings | Full Details in Telugu | @SaikumarTechy

Hi, thanks for watching our video about How to Create a Blog in 2023
In this video we’ll walk you through:
Blog Creation Tips
Blogger settings explained
How to start a blog

Robots.txt File:
http://bit.ly/40yGKML

మీకు ఏ వీడియో కావాలన్నా నన్ను కాంటాక్ట్ చేస్తే నేను కచ్చితంగా ఆ వీడియో చేస్తాను.

Check out our channel here:
https://www.youtube.com/@SaikumarTechy
Don’t forget to subscribe!

FIND US AT;
https://saikumartechy.com

Join Whatsapp Group For Your Doubts❓
https://chat.whatsapp.com/EkxKGhi1tlI…

FOLLOW US ON SOCIAL;
Get updates or reach out to Get updates on our Social Media Profiles!
☣️Twitter:
https://twitter.com/Saikumartechy

☣️Facebook: https://www.facebook.com/saikumartechy

☣️Instagram: https://www.instagram.com/saikumar_techy

☣️Telegram:
https://t.me/saikumartechy

☣️Share chat: https://b.sharechat.com/L6sgfRITDeb

☣️Website :- https://saikumartechy.com

DAILY JOB UPDATES
follow this website :-
https://bharatbadi.com

TOPICS COVERED:-
How to start a blog 2023
Blogging for beginners
Telugu blog creation guide
Best blogger settings to use
Telugu blog writing tips and tricks

#saikumartechy #saikumar #blogger
#howtostartablog #bloggingtutorial

For Any Copyrighted matters Contact us:
contact@saikumartechy.com

Disclaimer- Some contents are used for educational
purpose under fair use. Copyright Disclaimer Under
Section 107 of the Copyright Act 1976, allowance is
made for “fair use” for purposes such as criticism,
comment, news reporting, teaching, scholarship,
and research. Fair use is a use permitted by
copyright statute that might otherwise be infringing.
Non-profit, educational or personal use tips the
balance in favor of fair use.

:- Images used in this video thumbnail belongs to respected owners , not mine thanks to them.

N͟O͟ C͟O͟P͟Y͟R͟I͟G͟H͟T͟ I͟N͟F͟R͟I͟N͟G͟E͟M͟E͟N͟T͟ I͟N͟T͟E͟N͟D͟E͟D͟

COPYRIGHT NOTICE:-
Please feel free to leave Me a notice if you find this upload inappropriate. Contact me personally if you are against an upload wish you may have rights to the music, instead of contacting YouTube about a copyright infringement.

The Drop Times: TDT Is a Media Partner for DrupalSouth 2023

Posted on March 27, 2023 by Michael G
The Drop Times is delighted to announce that we will be media partners for the forthcoming DrupalSouth 2023.DrupalSouth is Australia and New Zealand’s regional Drupal meeting.
  • Previous
  • 1
  • …
  • 596
  • 597
  • 598
  • 599
  • 600
  • 601
  • 602
  • …
  • 821
  • Next

Recent Posts

  • Mentorship program to nurture pre-seed tech founders
  • Qwen3-Coder
  • Open Source is Back
  • An easy way to develop Home Assistant integrations
  • SmartEsq has launched an AI-powered MFN Election tool

Categories

  • Android
  • Linux
  • News
  • Open Source

Recent Posts

  • Mentorship program to nurture pre-seed tech founders
  • Qwen3-Coder
  • Open Source is Back
  • An easy way to develop Home Assistant integrations
  • SmartEsq has launched an AI-powered MFN Election tool

Categories

  • Android
  • Linux
  • News
  • Open Source
©2025 Open World News | Powered by Superb Themes
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT