In Drupal 7 we used a shortcode to embed the content from another node.

(Shortcode Embed Content Tag (shortcode_embed_content) Provides a shortcode tag for embedding a node content into text.) The syntax was this: [embed_content nid=5617][/embed_content]

Now I've installed shortcode for Drupal 8 and missed that very nice feature.

Is there another way to embed content from a node in another node?

Comments

Matroschker created an issue. See original summary.

dbielke1986’s picture

Version: 8.x-1.0-rc2 » 2.0.0
denes.szabo’s picture

Status: Active » Closed (won't fix)

The problem with the embed content is the circular reference. From A content you can embed B, and from the B you can embed A again.

It can cause an endless embedding loop. I have no solution for it. This is the issue about it: https://www.drupal.org/project/shortcode/issues/3067786

(Actually a guy already added a security ticket about it - this loop can brings the site down. Technically it is not a security issue, but…)

If I can get the content/entity id from the current text we are processing I could build a stack from the ids to prevent put same id twice. Unfortunately I can't.

So, I removed the embed content macro from the release. Maybe I would start a new project for this macro.