Closed
Description
It called to my attention that when trying to pass a Page object as a "yes" value, I was ending up with the page title as a result of the if(). Sample of the code I was trying to do, basically to add some dynamic values in a template used for rendering an email body.
$body = $this->files->render('mails/mjml/autoresponse.php', [
'listado_page' => $this->page->if("template=listado|desarrollo|privada", $this->page ),
]);
So I ended up discovering that the Page object evaluates to true
in this is_callable() call in PageComparison.php.
So, I think it would be more helpful to actually expect the Page object as a value?
Thanks!