This forum is for assistance with theme development.

Best Practices for Drupal Theme Development

Hey everyone,

I’m working on a custom Drupal theme and want to make sure I’m following best practices. I’ve set up a basic theme using Twig templates and a .info.yml file, but I’d love some advice on:

Subtheme for zeropoint is not inheriting css and js

Hello,

I am setting up a subtheme to keep my updated twig templates safe when updating the zeropoint theme.

I have followed the instructions on this page: https://www.drupal.org/docs/develop/theming-drupal/creating-sub-themes

And I have spent many hours reading documentation and watching videos.

My subtheme is installed and default and I can see that it uses my templates that I have placed in the templates folder of my subtheme.

bootstrap theme push from lando to pantheon dev

I updated the Drupal theme successfully on my local lando environment by navigating to /admin/config/development/configuration/full/export on the website, updated the theme name for all the blocks to the new name and imported the configuration file that was created. After all the CSS was fixed, I pushed the changes to the pantheon dev environment. Some config changes which were not trackable were also pushed by the lando push command. For example, when i go to development -> sync >..

Dxpr theme issues

Hello,

I am using the dxpr builder and dxpr starterkit theme.

I use slick slider and datatables. The slick slider and the datatables work ok in mobiles but they crash on desktop.

Fir an example if I navigate 3 or 4 times with the nav arrows of the slider the slider seems to lag during every slide change and the web site crashes.

The same happens with datatables when I click to add extra filters.

How to solve this ?

Single Directory Components - webpack

I’d like to use webpack for my scss and js in single directory components. How? Drupal reads css directly from the components folder and not from a dist folder.

Maybe i should create components in src/components and then copy all to the /components folder during the build?

Anyone has a working webpack config?

Drupal 10, "group" contrib module, how to get group type value in theme_preprocess_group function

Hello.

Drupal 10, groups, that you can find on /admin/group

I need to add a classname to body tag on group full page on front-end.

I try to get value from "group" object (image attachment), but, it seems, the "values" array is protected.

I also try to use function getGroupType() that exist in \modules\contrib\group\src\Entity\Group.php and \modules\contrib\group\src\Entity\GroupInterface.php to get group type value, but, it seems, is not working.

Pages

Subscribe with RSS Subscribe to RSS - Theme development