This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Scss file is being referenced instead of the css file

Hi,

I've been working with my scss and css files.  I first started using a css file in order to check the styles on the website, but now I think I really should use scss files to create my css file, as I change things.

I added the scss files under the scss folder:  _main.scss and _fonts.scss

In the theme-custom-styles.scss file I added references:

Symfony asset() function

I'm developing a module and I have a twig template being rendered by a theme.

I can't use the asset() function inside the twig template, because I always get a PHP error:

NOTICE: PHP message: Uncaught PHP Exception Twig\Error\SyntaxError: "Unknown "asset" function." at /app/web/modules/custom/my_module/templates/list-clients.html.twig line 6

I think I correctly installed symfony/asset using composer:

Using version ^5.2 for symfony/asset
 

What am I doing wrong here? Should I additionally configure symfony somewhere in Drupal installation?

Twig template directory path

I'm developing a module and a template is being rendered from modules/custom/my_module/src/templates/ directory.

However, the {{ directory }} variable inside twig points to 'core/themes/bartik' directory.

I suppose this is the parent theme.

How do I get the child theme path?

Show payment details in 'logged in' user 's order page

HI ALL, I have been working on a Drupal offsite payment module. I want that when a customer completes payment and place an order, additional information related to order (like transaction id, merchant reference number etc that's received in response from gateway side) gets captured in the order page of 'logged in' user. Check image below for reference :

Click here to see image

Display customised message in the order completion message

Hello All, I have been working on a Drupal offsite payment module. I want to display additional information related to order (like transaction id, merchant reference number etc that we get in response from gateway side)in the order completion message section. I have attached screenshot for reference. 

Click here

What I did: 

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions