[solved] 2 different News modules on 1 page?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
mev
Power Poster
Power Poster
Posts: 371
Joined: Wed Apr 25, 2007 5:00 pm

[solved] 2 different News modules on 1 page?

Post 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
Last edited by mev on Thu Aug 02, 2007 12:13 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: 2 different News modules on 1 page?

Post 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
mev
Power Poster
Power Poster
Posts: 371
Joined: Wed Apr 25, 2007 5:00 pm

Re: 2 different News modules on 1 page?

Post 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
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: 2 different News modules on 1 page?

Post 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
mev
Power Poster
Power Poster
Posts: 371
Joined: Wed Apr 25, 2007 5:00 pm

Re: 2 different News modules on 1 page?

Post 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
Post Reply

Return to “Layout and Design (CSS & HTML)”