Integrate hook in page module to render preview of records with own CType
The method tt_content_drawItem in tx_cms_layout (page module view) renders a preview for each defined CType, like header, text, textpic, etc. If an own CType is used, e.g. "tx_myext_pi1", the bodytext field is rendered by default and nothing less or more.
A solution for individual CTypes would be to introduce a hook that is able to render the preview of the accordant record.
In general the page module would be happy with kind of refactoring... ;-)
(issue imported from #M9078)
#6 Updated by Oliver Hader over 11 years ago
- the hook is not only for individual CTypes anymore
- the hook does a pre-proecessing before the regular processing of tx_cms_layout->tt_content_drawItem() - this one can be disabled by the hook ($drawItem) - the "if ($drawItem)" is just wrapped around the existing switch with no further changes there