Using the new "Fields" feature of the News module and a little editing of the template, I got this working.
First, in the "News" module you need to go to "Field Definitions" and create a new field - I called mine cms_selflink. The field holds the Page No. of the page that we're advertising with the News entry. (Note: If you have an older version of news, you can use the "Extra" field)
Now, in the News template, we can use $entry->cms_selflink to get the Page No. that we entered.
$entry->titlelink is the standard link produced by the Summary template. We can replace that with a {cms_selflink} tag. The title of the post comes stored in $entry->title, so between that and $entry->cms_selflink we have all the info we need. The tag would simply be {cms_selflink page=$entry->cms_selflink text=$entry->title}.
I also threw an {if} statement in to check that the cms_selflink field is filled - if not, we can assume it's a regular News entry (with no associated content page) and use the standard $entry->titlelink.
Here's a full copy of the Summary Template, as I'm currently using it...
Code: Select all
<!-- Start News Display Template -->
{foreach from=$items item=entry}
<div class="NewsSummary">
{if $entry->formatpostdate}
<div class="NewsSummaryPostdate">
{$entry->formatpostdate}
</div>
{/if}
<div class="NewsSummaryLink">
{if isset($entry->cms_selflink)}
{cms_selflink page=$entry->cms_selflink text=$entry->title}
{else}
{$entry->titlelink}
{/if}
</div>
<div class="NewsSummaryCategory">
{$category_label} {$entry->category}
</div>
{if $entry->author}
<div class="NewsSummaryAuthor">
{$author_label} {$entry->author}
</div>
{/if}
{if $entry->summary}
<div class="NewsSummarySummary">
{eval var=$entry->summary}
</div>
<div class="NewsSummaryMorelink">
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content}
</div>
{/if}
</div>
{/foreach}
<!-- End News Display Template -->
- Walkere