I have a link within a block. At the moment it goes to a list of newsletter nodes:
<p><a href="<?php global $base_url; print $base_url;?>/news-events/newsletter">Read our latest newsletter</a></p>
What I would prefer is to have it go to the latest node of the content type ‘newsletter’, is this possible?
There are two ways of doing this.
Sometimes it’s more practical for simple things like that to not use views, but write your own SQL instead. All you need is the node id of the latest node to get what you want. A query like this should get what you want:
The link to the node would be
node/nidwhere nid is the node id of the node.