The Piece of Content widget allows us to display the full content of another node on the page.
Generally good.

It would be useful to get a bit of information about what type of content was embedded.
WIthout some context, we cannot align styling of the widget embed with the full node view.

We get the succinct class "pane-panopoly-widgets-general-content-piece-of-content" right now, on the embed wrapper div:

<div class="panel-pane pane-views-panes pane-panopoly-widgets-general-content-piece-of-content">[...]</div>

Adding the [node:content-type] token as a class here would be ideal. The node puts this on the body tag, and node-specific styles generally trickle down from that logic.

hook_ time!

link to view: /admin/structure/views/view/panopoly_widgets_general_content/edit/piece_of_content

Comments

caschbre’s picture

Issue summary: View changes

We should be able to accomplish this in the View itself. Add the entity/bundle type to the fields as hidden, then use the token in the View row classes config.