Skip to main content
Please avoid Drupal version tags in question titles
Source Link
leymannx
  • 18.8k
  • 6
  • 72
  • 126

Drupal 8 shortcode Shortcode in template

I have installed and configured shortcodeShortcode in thea D8 project. However, when iI try to use a shortcodeshort code like [column] or [button], it gets rendered as is in the node view page.

I have used a block panel in the node view page. And the in the block template, i I have rendered the body field like {{ content['#node'].body[0].value|raw }}.

However, iI have noticed, that if iI render the content as a whole like {{ content }}, the shortcodesshort codes gets rendered properly as intentedintended.

What am iI doing wrong here guys.?

Drupal 8 shortcode in template

I have installed and configured shortcode in the D8 project. However, when i try to use a shortcode like [column] or [button], it gets rendered as is in the node view page.

I have used a block panel in the node view page. And the in the block template, i have rendered the body field like {{ content['#node'].body[0].value|raw }}

However, i have noticed, that if i render the content as a whole like {{ content }}, the shortcodes gets rendered properly as intented.

What am i doing wrong here guys.

Shortcode in template

I have installed and configured Shortcode in a D8 project. However, when I try to use a short code like [column] or [button], it gets rendered as is in the node view page.

I have used a block panel in the node view page. And the in the block template I have rendered the body field like {{ content['#node'].body[0].value|raw }}.

However, I have noticed, that if I render the content as a whole like {{ content }}, the short codes gets rendered properly as intended.

What am I doing wrong?

Source Link
Pratip Ghosh
  • 418
  • 1
  • 3
  • 19

Drupal 8 shortcode in template

I have installed and configured shortcode in the D8 project. However, when i try to use a shortcode like [column] or [button], it gets rendered as is in the node view page.

I have used a block panel in the node view page. And the in the block template, i have rendered the body field like {{ content['#node'].body[0].value|raw }}

However, i have noticed, that if i render the content as a whole like {{ content }}, the shortcodes gets rendered properly as intented.

What am i doing wrong here guys.