Page 1 of 1

Using news module twice on website

Posted: Fri Jun 26, 2020 10:54 am
by babel
I've got a short question. Hopefully the answer is allso short. Is there a way that I can use the news module for two different pages? One page is for a blog, the other for articles/news. So the content is different. The blog has no categories, the articles have about five.
For both I put the following

Code: Select all

{news number="5" detailpage='news_detail'}
in the templates.

cms ms: 2.2.14

Re: Using news module twice on website

Posted: Fri Jun 26, 2020 11:19 am
by webform
The easiest way is to apply categories to your articles, so on your blog page you have

Code: Select all

{news number="5" detailpage='news_detail' category='blog'}
and on your article/news page have

Code: Select all

{news number="5" detailpage='news_detail' category='news'}
So when you add a new article and select a category it will automatic show on the correct page/category.

Re: Using news module twice on website

Posted: Fri Jun 26, 2020 12:55 pm
by babel
Thanks webform for your answer. If I use

Code: Select all

category="article1, article 2"
the category changes into

Code: Select all

h1
-tag and it should be

Code: Select all

<ul class="list1">
<li class="firstnewscat"><a href="#"article1</a></li><li class="firstnewscat"><a href="#"article1</a></li></

Re: Using news module twice on website

Posted: Fri Jun 26, 2020 2:04 pm
by webform
I'm not sure i understand what you mean?

Change categories into h1 tag?

When you use your News module tag:

Code: Select all

{news number="5" detailpage='news_detail' category='blog'}
Your News Summary Template does automatic generate the needed output for listing your articles.

If you want to change how the News Summary are listed, you can change the News Summary Template in "Layout => Design Manager => Templates".

Either create a new News Summary Template og edit the default one.

BTW! If you want to use multiple categories in the News Module Tag, i belive you can't have spaces between categories. So you should use:

Code: Select all

{news number="5" detailpage='news_detail' category='category1,category2'}
NOT

Code: Select all

{news number="5" detailpage='news_detail' category='category1, category2'}

Re: Using news module twice on website

Posted: Fri Jun 26, 2020 7:58 pm
by babel
It's without spaces. So I'm happy, thanks to your help, webform.