Hello,
I am having trouble achieving this: I am trying to place a link to a specific page in my template.
But I want this link displayed only, if the page is published.
With this code, its not working:
<?php if ($pages->find("id=1241, status=published")) { ?>
<a href="<?php echo $pages->get(1241)->url() ?>"><?php echo $pages->get(1241)->title() ?></a>
<?php } ?>
(The link is being displayed no matter the status of the page "1241")
How can I fix this?
Thanks for your help!!!