Page 1 of 1

How To Create a NEWS PAGE

Posted: Sat Nov 17, 2007 4:07 am
by bcsweb1
1. Latest Version of CMS - 1.2
2. News Module 2.6

The default CMS templates have the news tag {news} in the left hand column. News as a 'page type' is no longer supported.

So my question is we need to create a NEWS PAGE - where someone clicks there and see's all the articles - just like the old News Module allowed as a page type.

How do create a page that will show all the articles and we can link to it?

Thanks

Re: How To Create a NEWS PAGE

Posted: Sat Nov 17, 2007 4:24 am
by kermit
make a new (regular content) page, title and call it whatever you want.. this example assumes the page alias of: news

in the content area use something like:

Code: Select all

{news browsecat='1'}
{news detailpage='news' number='5'} 
this will give you a (linked) list of categories followed by summaries of the 5 newest articles. if you just want "all" article summaries, use:

Code: Select all

{news detailpage='news'}
optional.... back in your cmsms template, you can change the {news} tag to read something like:

Code: Select all

{news detailpage='news' number='2'}
to limit the number of article summaries shown in that more limited space.

Re: How To Create a NEWS PAGE

Posted: Sun Nov 18, 2007 5:35 pm
by bcsweb1
I did what you suggested but I am not sure if it is correct...

http://awomansworth.org/site/index.php?page=press

On this page I just want the articles to appear and not the left column with the same thing again.

Any ideas?

Re: How To Create a NEWS PAGE

Posted: Sun Nov 18, 2007 5:38 pm
by calguy1000
Then you have a number of options.....

1) you could create a new page template, that takes {news} out of the left column and use that new template for your news page.

or

2) you could set a variable in the metadata section of the news page and then use some logic to optionally display the news.

i.e:
  (in the metadata section on the options tab):  {assign var='hideleftnews' value='1'}
  (in the page template):  {if !isset($hideleftnews)}{news}{/if}

Note, that this is a very powerful technique that can be used for a variety of purposes.