Blog Sections Open
Showing a Video Block in Ditto Only When the TV Has a YouTube ID
A video TV is easy to add. The real question is how to render it cleanly only when the item actually has video data.
The donor described a video TV that stored a YouTube identifier such as oQ-Eczon2HI, and the question was how to show the video block only when that TV was filled.
The template concern
In list output, empty video placeholders make the markup noisy. The goal is to keep the block absent unless a real video value exists.
Why this pattern matters
This is one of those cases where conditional rendering matters more than the video embed itself. Whether the project uses PHx, IF, or another helper, the important part is to keep the listing resilient: no empty wrappers, no broken embeds, no confusing blank blocks.
Practical recommendation
Treat the video TV as optional content. Prepare the embed URL in one place, and only render the block when the source value is present and valid.
Creating Resources from eForm Submissions with docmanager
How to create a new Evolution CMS resource from an eForm submission by using docmanager and mapping both standard fields and TVs in one flow.
Formatting Price Output with parseTplChunk in Evolution CMS
How to format numeric price values before they reach a chunk by using parseTplChunk and a small normalization step in Evolution CMS.