backdrop-contrib / block_embed

Allows a block to be embedded into the body of content, for example, after the 2nd paragraph.
GNU General Public License v2.0
1 stars 0 forks source link

Allow setting of paragraph placement to be determined by integer field for each node #3

Open yorkshire-pudding opened 2 years ago

yorkshire-pudding commented 2 years ago

Moved from https://github.com/backdrop-contrib/block_embed/issues/1#issuecomment-1058413986

Another thing I think would be a great addition would be the ability for each content type to be able to select an integer field that would define which paragraph the block_embed is placed for each node.

I have a use case in mind:

  1. an online magazine has article nodes with a field for a pull-out quote that they want to embedded within the text
  2. a view gets the context from the node and puts the right field value in a block
  3. the integer field for that node says which paragraph to put it after
  4. the block with the pull out quote for that node appears after the selected paragraph, drawing attention to it in a relevant place.
jenlampton commented 2 years ago

Duplicating my comment from #1 also:

I often need an embedded block in a view, or a field, and usually do that in the theme layer. I haven't thought about how we could use this module!

I don't usually do this with paragraphs, but if we build this for fields generically, it would work for paragraphs as well as any other multi-value field.