This forum is for assistance with theme development.

How print a media field into the bootstrap

Hi

To print a field type image in Bootstrap I use the following code and work fine

file_url(node.field_image.entity.uri.value)

 but if I want to print a Media entity don't work, some idea?

Thanks

Problem with Views and node--fws.html.twig - formatting page

New to Drupal and I'm not a program. 

In Drupal 9 I added a new content type "FWS," Created a view for the FWS content type. My problem is the pages generated by Views is not formatted. 

I created node--fws.html.twig to format the page, but it only half works. 

My first problem is I can't get the initial field, field_title, to display at all. The other fields display, but with the label and field value. 

Here's the HTML in the .twig

Remove link on users portraits in blog posts

Hello,

I search to remove the <a> link on the portraits in my blog posts on a Drupal 9.x

Here is a part of my page's code:

Get field value from hook theme_preprocess_field

Hi,

Working on a sub theme of Radix and trying to access the value of a node's field using the theme hook theme_preprocess_field.

This value can then dynamically set the css class of the rendered field.

In the code stub below the field name is accessible in the hook but not the value inside the field.

Adding site/home/front link in block content

I have just migrated to D9.

I need to add site/home/front link in custom block content.

In D7 this used to be easy: adding a site to site front (using PHP snippet):

<a href="<?php global $base_path; print $base_path; ?>" Go to this link </a>

I can't figure out how to do this in D9 since twig codes don't work here.

Can anyone suggest what to do?

Animated Menu with Superfish

Hello,

I would like to create an animated menu for my site "https://www.rainer-regimentsmuseum-salzburg.at". There is a (single-level) menu item "News/Information" on the right side of the menu bar that I simply want to "blink" when there is something new that should be drawn to attention. My menus are based on Superfish, my theme is (still!) a subtheme of Bartik. Anybody who can point me in the right direction?

Regards,
H. Stoellinger

Pages

Subscribe with RSS Subscribe to RSS - Theme development