I need to render entity as a part of page instead of individual page. By this I mean I want to able to render it without DOCTYPE declaration and HEAD tags.

Typically this could be done within html.tpl.php but I haven't found the correct naming convention or other solutions.

How to render entity programmatically in a bare div container using Entity view modes? This shouldn't be a huge problem since e.g. Views can list entities using a certain display/view mode. I'm trying to render it in a Rules config to send it out as email.

1 Answer 1


So in the end it was the Emogrifier class that kept adding the DOCTYPE and everything else.

It would have been good to know that it adds CSS inline but it also fixes/creates a whole new document. So it can't be used for e.g. fragments or in this case entities.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.