The record arrives under a different name on each page type, and a Smarty partial sees everything in the caller's scope, so a partial reading $page works on pages and reads nothing, or an unrelated variable of the same name, elsewhere. Pass the record under an agreed name (item=$post) and read only that; in Twig, include with only so the partial sees nothing else.
Answer
Templates and engines
A partial shared between two page types sees different variables in each
More in Templates and engines
Was this page helpful?
Your answer goes to the docs team.