This forum is for assistance with theme development.

How get node title in webform?

I have webform with fields: name, phone and hidden field product.
For hidden field I use token [current-page:title]
Alll pages of pruduct have the button that pops up a webform.
When submitting a form I would expect that [current-page:title] returns title of the current product page I'm currently on. Instead it points to webform title.
Please tell me how to get a real title?

Twig Filter replace

I need replace field value to some text if value equal 0
in node--new_material.html.twig

{{ content.field_cena }} - it displays the value

These filter versions don't work

{{ content.field_cena|replace({'%0%': 'some text'}) }}
{{ content.field_cena|replace('0', 'some text') }}
{{ content.field_cena.0|replace({'%0%': 'some text'}) }}
{{ content.field_cena.0|replace('0', 'some text') }}

nothing is displayed.

Please tell me the solution!

Collapsible blocks

Hi,

I have a custom block and I want to make it collapsible sideways when it appears on my custom page. I have looked for examples but I found nothing helpful. Could you please guide me?

Thanks,

Grids in Views: Aligning Image

Hi,

I have a view page with grids like the following.

https://imgur.com/a/B94xxrf

How can align the image at the center of the grid cell with equal padding on all 4 sides?

I am new to css, your help is appreciated.

How to choose the flag type display mode ?

I created a type of "article" node. A user can flagged the nodes.

On the "full" nodes, I want to display the link for flagged and the total number of flag. With the latest version of the module it is easy because it supports the counter in TWIG.

On the "teaser" of the node, I want to display only the total number of flags. But in the node display mode, there is nothing to select the flag display mode.

How to choose the display mode of the flag type from the display mode of the node ?

It's a shame that this feature is not available.

OR

Broken preview (8)

Hi,

I'm developping my own theme that extends the classy drupal theme.

The displaying of the standard page is working well (for both page and post type).

But when I'm trying to do the preview, the page is displaying everything but the content of my node (no title, no content, no custom field...)

So i dumped my node for the preview, but the node is apparently NULL on preview (but works on standard view mode).

If it helps, this is my suggestion hook

Pages

Subscribe with RSS Subscribe to RSS - Theme development