Specbee: Style Made Simple with Acquia Site Studio’s Style Guide Manager

Ever wished you could tweak your web page’s header font or switch up your CTA color, but skipped it to save your developer from the hassle? With Acquia Site Studio’s Style Guide Manager, you don’t have to! Non-technical content marketers now have the power to make styling tweaks to their Drupal site theme via an intuitive interface. Are you interested in learning more? Come on in! What is Site Studio Style Guide Manager Previously Acquia Cohesion, Site Studio is a composable, low-code digital experience tool by Acquia that enables users to build and assemble pages with less to no code. Check out our previously written article about how to build component-based websites on Drupal using Site Studio.   Style Guide Manager is an optional module that you can enable within Site Studio. It centralizes the design elements like colors, typography, and components in one place, making it easier to maintain a cohesive look and feel throughout your site. It provides a set of style guides that are theme-specific. You can create style guide(s) to manage Site Studio styles within your Drupal theme settings. You can even override your theme styles using the Style guides. Advantages: Change the appearance of your Drupal website based on the active theme. Apply global styles and change the appearance with a simple-to-use interface. Create design systems for multi-brand and multi-sites. Style guide manager has two interfaces: Style guide builder Style guide Style Guide Builder The Style Guide Builder is a tool within Acquia Site Studio that allows you to actively create and manage the Style Guide. It streamlines the process of updating and maintaining the design standards. Changes made here are automatically applied throughout the site. Style guide The output of a Style Guide Builder - a set of design guidelines, is the Style Guide. The Style Guide is a collection of design rules, standards, and components that define the visual appearance of your website. Creating a Style Guide First, make sure you have installed Acquia Site Studio.  Navigate to /admin/cohesion/style_guides  Click on Add Style guide Add the Title Click the + button below the Style Guide form to add the form fields. Add the fields such as Font picker, Color picker, etc. with the combination of form layout fields such as Group accordion, and Tabs as per your requirement. Give a meaningful name for the Field Label so it will generate a meaningful token. This is how your Style Guide creation page will look like: You can also see the preview below of your Style Guide form builder and how it looks on the theme settings. Click on Save and Continue Managing your Styles Now that you have successfully created a Style Guide, let's see where and how you can manage your styles. Navigate to your theme appearance settings (here mine is: /admin/appearance/settings/techx) Add your values such as fonts, colors, etc., and save the configuration. This is how your style guide will look like after successfully saving the configuration. Now, you need to use the Style Guide tokens in the styles to see your styles on the front end as per the Style Guide values. Tokens are predefined variables or placeholders representing design elements such as colors, typography, spacing, and other visual properties. This is not just restricted to styles, you can use these tokens throughout your Site Studio like templates, or components as per your requirements. For example: Make sure you enable the token variable mode and then add your tokens. Implementing the Style Guide With Site Studio’s Style Guide Manager, you can create multiple style guides as per your requirements. You can see all of them in your theme settings as shown below This is what my front end looks like. You can change the values in the Style Guide per your requirements and verify the page/site accordingly. Final Thoughts Site Guide Manager is a very useful tool for non-technical users like content editors and marketers to see all the styles in one place with an easy-to-use user interface and modify them according to their choice. All of this without depending on a developer.        Are you looking to build highly engaging, omnichannel, and result-driven solutions with Acquia and Drupal? We are Acquia partners and we know what it takes to get you there. Talk to us today to find out more.        

Web Wash: Getting Started with Webform in Drupal (2024)

Webform is a Drupal module that allows you to create forms directly in Drupal without using a 3rd party service.

It can be used to create basic “Contact Us” and complex application forms with custom field logic and integration.

In this getting started guide you’ll learn how to:

  1. Create a form
  2. Add elements to form
  3. Customize form with conditional logic
  4. Embed the form
  5. Send submissions to Google Sheets

This tutorial accompanies the video above.

PreviousNext: Automatic message scheduling and replacing hook_cron

Symfony Scheduler provides a viable replacement to hook_cron wherein messages can be scheduled for dispatch at a predefined interval. Messages are dispatched the moment they are scheduled, and there is no message duplication, making tasks more reliable and efficient.

by daniel.phin / 6 February 2024

This post is part 4 in a series about Symfony Messenger.

  1. Introducing Symfony Messenger integrations with Drupal
  2. Symfony Messenger’ message and message handlers, and comparison with @QueueWorker
  3. Real-time: Symfony Messenger’ Consume command and prioritised messages
  4. Automatic message scheduling and replacing hook_cron
  5. Adding real-time processing to QueueWorker plugins
  6. Making Symfony Mailer asynchronous: integration with Symfony Messenger
  7. Displaying notifications when Symfony Messenger messages are processed
  8. Future of Symfony Messenger in Drupal

With this, the sm worker provided by the SM project, the Symfony Messenger integration with Drupal, can be solely relied on. Rather than legacy runners such as Drupal web cron, request termination cron (automated_cron.module), Drush cron, and Ultimate Cron.

Scheduler functionality is implemented by the Symfony Scheduler component. The Drupal integration is provided by the SM Scheduler module

Schedule provider

Create a message and message handler as usual, then create a Schedule Provider:

<?php declare(strict_types = 1); namespace Drupal\my_module\Messenger; use Symfony\Component\Scheduler\Attribute\AsSchedule; use Symfony\Component\Scheduler\RecurringMessage; use Symfony\Component\Scheduler\Schedule; use Symfony\Component\Scheduler\ScheduleProviderInterface; #[AsSchedule('my_scheduler_name')] final class MyScheduleProvider implements ScheduleProviderInterface { /** * {@inheritdoc} */ public function getSchedule(): Schedule { return (new Schedule())->add( RecurringMessage::every('5 minutes', new MyMessage()), ); } }

A schedule provider is:

  • a class at the Messenger\ namespace
  • with a #[AsScheduler] class attribute
  • implementing \Symfony\Component\Scheduler\ScheduleProviderInterface
  • implements an getSchedule method. This method returns a message instance and the schedule frequency.

For dependency injection, schedule providers have autowiring enabled.

What would normally be the contents of a hook_cron hook would instead be added to the message handler. The message itself does not need to store any meaningful data.

Instead of intervals via RecurringMessage::every(...), crontab syntax can be used:

\Symfony\Component\Scheduler\RecurringMessage::cron('*/5 * * * *', new MyMessage());

Running the worker

Lastly, schedulers must be run via the consume command with a dedicated transport. The transport name is the schedule ID prefixed by scheduler_. For example, given the scheduler ID my_scheduler_name from above, the transport name will be scheduler_my_scheduler_name.

The command finally becomes: sm messenger:consume scheduler_my_scheduler_name .

Timing

Messages will be dispatched the moment their interval arrives. Normally intervals begin when the worker is initiated, however you can set a point in time to begin interval computation using the \Symfony\Component\Scheduler\RecurringMessage::every   $from parameter.

The worker must be running at the time when a message is scheduled to be sent. The transport won't retroactively catch-up with messages not dispatched during the time it wasn't running.

The next post outlines how to intercept legacy Drupal @QueueWorker items and insert them into the message bus.

Tagged

Symfony, Symfony Messenger, Symfony Scheduler, Cron

DrupalEasy: DrupalEasy Podcast S16E4 - Kevin Quillen - Drupal 10 Development Cookbook

We talk with Kevin Quillen, author of Drupal 10 Development Cookbook, published in February, 2023 by Packt Publishing. 

URLs mentioned

DrupalEasy News

Professional module development - 15 weeks, 90 hours, live, online course.  
Drupal Career Online - 12 weeks, 77 hours, live online, beginner-focused course.

Audio transcript 

We're using the machine-driven Amazon Transcribe service to provide an audio transcript of this episode.

Subscribe

Subscribe to our podcast on iTunes, Google Play, iHeart, Amazon, YouTube, or Spotify.

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.

Credits

Podcast edited by Amelia Anello.
 

Talking Drupal: Talking Drupal #436 - Drupal & AI

Today we are talking about AI within Drupal, How AI can help, and Modules to use with guest Martin Anderson-Clutz. We’ll also cover Augmentor AI as our module of the week.

For show notes visit: www.talkingDrupal.com/436

Topics
  • Terminology
  • IMF analysis
  • Prompt engineering
  • AI in Drupal
  • Best way to try modules
  • Best use of AI
  • Other ways of integrating
Resources
  • Augmentor AI
  • Open AI
  • Prompt Engineering: Get the Most From Your Drupal Site's AI Integration
  • Terminology
    • NLP - work with text provided in a conversational format, understand the intended meaning, and provide a relevant response
    • AI - A subset of CS that aims to develop systems that can mimic human response, or automating sophisticated behavior
    • ML - subset of AI that aims to act without explicit guidance, by extrapolating from known data
    • Deep learning - a subset of ML which uses artificial neural networks with representational learning to develop and leverage their own means of classification and other feature detection
    • LLM - an AI algorithm that uses Deep Learning techniques to accomplish NLP tasks such as responding to unstructured user prompts. LLMs are trained on massive data sets, often gathered from the internet, but sometimes using more specialized data
    • Typically the AI interfaces our listeners are already using are based on an LLM, but the nature and recency of the data they’ve been trained on can vary widely. Recently Mike Miles created Drupal Droid, a GPT model specifically trained for Drupal developers, and you can find a demo of that in our YouTube channel
  • Mike Miles Drupal Droid
  • AI module list
  • OpenAI Image
  • Search API Pinecone
  • TMGMT Translator OpenAI
Guests

Martin Anderson-Clutz - mandclu

Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi

MOTW Correspondent

Martin Anderson-Clutz - mandclu Augmentor AI

  • Brief description:
    • Have you ever wanted a highly configurable way to integrate multiple AI services with your Drupal site? There’s a module for that.
  • Brief history
    • How old: created in Oct 2022 by murrayw of Morpht, though recent releases are by elonel
    • Versions available: 1.1.2 which works with Drupal 9.5 and 10
  • Maintainership
    • Actively maintained, most recent release was earlier this month
    • Documentation available
    • Number of open issues: 11, 3 of which are bugs
  • Usage stats:
    • 82 sites
  • Module features and usage
    • To use Augmentor AI, you need to define one or more “augmentor” configuration entities. An augmenter entity implements an augmentor type, which determines what AI service it can use, what configuration options it will have available, and so on.
    • The augmentor will define one or more “messages” that provide structure to the prompt that will be passed to the AI model in order to generate a response. It can also be configured in a variety of ways, such as how much randomness to use, a maximum response length, and more.
    • You can expose your augmentor(s) to content creators by adding a CKEditor button, or by adding fields to your site’s entity forms. For each field use can choose the widget to use, and how it should interact with any existing data in the field you want to target.
    • For example, you could have it generate a summary from your body field and have it automatically populate the summary field. Or, you can have it suggest tags, but the specialized widget renders each suggestion as a clickable element that will add the tag to a core tag field.
    • There are currently modules available to integrate Augmentor AI with ChatGPT, Google Cloud Vision, AWS AI, and more.

Golems GABB: Improving Page Loading Speed in Drupal with Different Caching Solutions

Improving Page Loading Speed in Drupal with Different Caching Solutions Editor Mon, 02/05/2024 - 12:12

Fun fact. Drupal was started in 2001 — two years before WordPress was released. According to W3Techs, this CMS powers 1.1% of all websites, from blogs to e-commerce and government sites, holding a 1.6% market share.
Building a website with Drupal is a good idea. But remember: a poorly optimized Drupal site is vulnerable, has lower response times, and results in database delays. When talking about its performance optimization, the tricks include different architectural changes, modes of caching, and other ways to speed up website load time. 

Drupal Association blog: Drupal Association Co-Founds the Open Website Alliance

The international community organizations behind Drupal, Joomla, TYPO3, and WordPress join forces in a leadership-level alliance. The members of the Alliance are united in their shared values and their message to decision-makers to always choose open source software over proprietary systems.

The Alliance represents the content management systems (CMS) behind roughly 50% of all websites online today. The Open Website Alliance was founded to promote the choice of open-source software and facilitate collaboration between free and open-source web content management projects, furthering openness, trust, and quality. Other free and open-source CMS organizations are encouraged to apply for membership.

Open source is not just the future of software, it is the present,” said Tim Doyle, CEO of the Drupal Association. “At a time when some market forces are pushing solutions that require users to sacrifice ownership of their data, we know that open source offers a better way. Through this alliance, we can help promote, educate, and inspire end-users to take back control of their software, their data, and their own words. Together we can build a better web.

Collaboration on Leadership Level

The Alliance comes about as the result of the collaboration between the Drupal Association, Open Source Matters (Joomla), the TYPO3 Association, and the WordPress Project around an open letter to the European Union.

The Alliance uniquely connects its members on a leadership level. This means the organizations can more easily coordinate strategy and actions, fostering new cross-community collaboration projects and strengthening those that already exist.

The organization’s leadership is also based on collaboration. The presidency rotates among the members, and all decisions are consensus-based. 

A Common Stance for Open-Source Software

According to the Alliance’s purpose statement, the “members commit to jointly encourage prospective website owners and developers to always choose open source software over proprietary systems, and to educate why this decision is the first and most important one in a website project. Through this advocacy, we are expanding opportunities for all open source CMS projects.”

The purpose statement describes the Alliance as a “community of communities, built on and furthering openness, trust, and quality.” The collaboration organization also seeks to “benefit the public perception of open source projects, the reliability of open source software, [and] the quality and safety of open source communities,” by being “a platform where members can share and discuss best practices.”

Accounting for the distributed and collaborative nature of open-source software — also beyond content management — the Alliance also includes support of upstream dependencies: “Whenever possible, the Alliance should support third party open source projects and communities upon which our projects depend.”

Shared Values on Open Web

In addition to a promise of joint collaboration, the Open Website Alliance members adhere to the Open Web Manifesto. Originally pioneered by the Drupal Association, the manifesto is a commitment to the web as an empowering tool, built on freedom and decentralization: “Everyone in the world, regardless of background, identity, ability, wealth, or status, has a home on the open web as a user, creator, architect, and innovator. It requires participation: The open web is a shared resource and a shared responsibility, sustained by deliberate choice and collaborative effort.”

Harnessing the concept of shared responsibility, the manifest describes the open web as a protector of privacy and freedom of speech. It should also “enable the next generation of innovators and entrepreneurs” and “must be resilient to a changing world and not controlled by a select few.”

Drupal Association a Proud Co-Founder

The manifesto ends with a grand perspective on the role of the open web and open-source software that could also be a credo for the Alliance’s member projects: “Together, we’re shaping the foundation for how the digital world operates, and how future generations will live, work, connect, and express themselves. As long as our software exists, that foundation will be an open web that is open source, open access, and always open to improvement.”

The Drupal Association is proud to be a founding member of the Open Website Alliance and extends a special thank you to Matthias at Typo3 for his leadership in its formation. This work firmly aligns with the Drupal Association’s vision for a web that is innovative, inclusive, and open.

LN Webworks: Mastering PHP Debugging: A Guide to Xdebug in Lando & DDEV for Drupal

Image removed.

Did you know that the first-ever computer bug wasn't a piece of software code, but an actual moth? Now, let's talk about something related but not quite as buggy – website development.

Debugging is like fixing problems in a website's code. It's important because it helps Drupal developers find and solve issues, making the website work better. To do this, you need the right tools. One handy tool for PHP (a programming language often used in web development) is XDebug.

In this article, we’ll share the steps and things you need to know to set up PHP debugging using XDebug. We'll focus on using Lando and DDEV setups for Drupal. And to make things even better, we'll be using the VS Code IDE (that stands for Integrated Development Environment). Let’s get started! 

A Close Look at XDebug

XDebug is a powerful debugger that makes it easier for PHP developers to create a smooth functioning website. Here are some core features of it: