Page 1 of 1

[solved] 2 different News modules on 1 page?

Posted: Thu Aug 02, 2007 10:01 am
by mev
Hello again,
Is it possible to put 2 News modules within 1 page (at different positions), to be able to have different articles  appear in each of them??
If so, how should I specify the difference in my template, which parameters should be used in the code {news} for such a thing?

Could not find anything about this in the help-pages !!!

Thanks in advice for any tip !!

Willemijn

Re: 2 different News modules on 1 page?

Posted: Thu Aug 02, 2007 10:33 am
by RonnyK
Willemijn,

you can create a different container to have the second NEWS styled/positioned differently.

Both callings of the news can have their own category.
(optional) category="category" - Only display items for that category.
Use * after the name to show children. Multiple categories can be used if separated with a comma.
Leaving empty, will show all categories.
The default calls a container called "news" and correspondingly styles it in the CSS:

Code: Select all

      {* Start News *}
      <div id="news">
         <h2>News</h2>
          {news number='3' detailpage='news'}
      </div>
      {* End News *}
By adding another container, say " ", you're free to do what you want.

Ronny

Re: 2 different News modules on 1 page?

Posted: Thu Aug 02, 2007 11:18 am
by mev
Thanks Ronny,
The styling of the News is not the problem, they can be just the same
It's the content I wish to be different in each of them!

I didn't want to have categories displayed at all for this site, so I disabled that.
But may be I should use it again to be able to separate those those 2 contents..
Is there a possibility to do that whithout having the text Category' displayed on the page itself ??

Or would you suggest another sollution

Thanks again,
Willemijn

Re: 2 different News modules on 1 page?

Posted: Thu Aug 02, 2007 11:23 am
by RonnyK
To have the text not being displayed on the site, you can go into the templates within the NEWS-module "Content -> News", in the summary template, delete:

Code: Select all

<div class="NewsSummaryCategory">
	{$category_label} {$entry->category}
</div>
Then the category won't be shown on the summary-view,

On the detail-template, delete:

Code: Select all

{if $entry->category}
	<div id="NewsPostDetailCategory">
		{$category_label} {$entry->category}
	</div>
{/if}
and it won't be shown in the details as well.

Ronny

Re: 2 different News modules on 1 page?

Posted: Thu Aug 02, 2007 12:10 pm
by mev
Great Ronny, it works!!!

I didn't delete the category code for details though, and it still doesnot display as wished! Suppose it should be another code then? I remember deleting something myself earlier.
Anyway, it works like this

Willemijn