News item as internal page link?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 102
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

News item as internal page link?

Post by Charles Butcher »

Is it possible to make a News item an internal page link, as you can do in the Content Manager?

I run a site where new pages are added regularly. To alert readers when this happens we post a news item with a link - so to read the new document they have to click twice. For routine stuff like meeting minutes, a single click would be better.

So the news item would need a title and a summary, but the "main content" would never be shown, and clicking on the title would go straight to the page in question.

Thanks for any ideas.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: News item as internal page link?

Post by DIGI3 »

In the default news summary templates, the 'more' link goes straight to the news detail article, isn't that all you're asking for?

If you want to actually add them to the navigation, you might want to look at CGSmartNav http://dev.cmsmadesimple.org/projects/cgsmartnav
Not getting the answer you need? CMSMS support options
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 102
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: News item as internal page link?

Post by Charles Butcher »

In the default news summary templates, the 'more' link goes straight to the news detail article, isn't that all you're asking for?
Thanks, but I guess I didn't explain clearly. I want the 'more' link - well actually the title of the news item – to go straight to an existing page, not the text of the news item.

The underlying reason is that I don't want to put the document in the body of a news item. It needs to be properly archived, and I think that's much easier to do as a page than as a news item. (I'd be interested to hear if anyone else uses CMSms to archive large sets of meeting minutes or newsletters, though.)

So I want to use news to show people there's something new to read, but to link this to a page instead.

For CMSms pages, an internal page link has its own title and appears independently in the navigation. But it has no content of its own - it's just a link to another page. I find those very useful.

I envisage something similar for news. The "virtual" news item would have a title and a summary, but no main content. Clicking on the title would take you to a particular linked page.

Obviously that's no use in any kind of display format that shows complete news items. But it could be handy where you have, say, a sidebar showing just news titles and summaries, as I do. In my case the summary would say something like "Meeting minutes for 12 July". Click that, and you'd go straight to the page with the relevant document.

As it is, readers have to click to open the news story, which just says "Click here to read the minutes from 12 July". So that's two clicks to get them where they want to be.
If you want to actually add them to the navigation, you might want to look at CGSmartNav http://dev.cmsmadesimple.org/projects/cgsmartnav
That would be cool if I wanted permanent nav links, so thanks for drawing it to my attention. But I just want links that will move down a list as new news is posted, and drop off the bottom after a week or three.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: News item as internal page link?

Post by Dr.CSS »

Are the News titles going to be the actual name of the page, if so you can make a custom news template that uses the 'title' in a link that goes to that page, if the pages are created first, or use a new field in news to make the link...

I can think of a few ways to do this...
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 102
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: News item as internal page link?

Post by Charles Butcher »

Are the News titles going to be the actual name of the page, if so you can make a custom news template that uses the 'title' in a link that goes to that page, if the pages are created first, or use a new field in news to make the link...

I can think of a few ways to do this...
That sounds a great idea. Unfortunately it's not ideal. The news items are in a sidebar, so their titles have to be very short. Whereas the pages need long names because they're part of long archived sequences that need to be distinguished by type, date and so on.

But maybe the custom news template could link to an internal page link - not visible in the navigation - with the same name, which could in turn point to the actual page. Thank you for getting me thinking.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3483
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: News item as internal page link?

Post by velden »

What about just one extra field definition in the News module where you type the ALIAS of the new page?

In your News template you can then type something like:

Code: Select all

{cms_selflink page=$entry->fields['targetpage']->value}
In this example the field definition would be named 'targetpage'.
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 102
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: News item as internal page link?

Post by Charles Butcher »

Thank you Velden. That sounds like just what I was looking for!
Post Reply

Return to “CMSMS Core”