This forum is for assistance with theme development.

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

Add sample content when installing custom theme ?

Hi guys,

I searched around in documentation and haven't found a clue so far : Is there a way to create sample content upon theme install ?

I managed to create a content type itself and a custom block too but I would like to add, when installing the theme, a sample content of each to demonstrate what it looks like once theme installed. Up to the end user to modify or delete it.

Thx

Entity Print

I apologize if I was wrong where to post
I have to do some printouts (some very complex) and Entity Print should be fine
I read the article of this link https://www.drupal.org/docs/contributed-modules/entity-print/usage and installed the module.
Then as described I updated the bartik.info.yml file with this code

Pages

Subscribe with RSS Subscribe to RSS - Theme development