News module: displaying only details

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
vorcan
Forum Members
Forum Members
Posts: 12
Joined: Thu May 19, 2011 7:08 am

News module: displaying only details

Post by vorcan »

Hello,

Can anyone tell me how to display only details using news module, without displaying summary?

I've been thinking a while about it and can't find a solution. I have a website, where on main page I've got some article (summary of it) with "more" button. Styled it using own templates, so the code looks like:

Code: Select all

{news number='1' detailpage='some-page' category="cat" detailtemplate="Sample" summarytemplate="Sample"}
Now, the same article, but without summary (only details) must be displayed in some other place at my web. Logically, following code should do the job:

Code: Select all

{news number='1' detailpage='some-page' category="cat" detailtemplate="Sample" }
Sadly, it doesn't, cause even if I don't precise the template for summary (which, in my opinion should eliminate it from displaying), it's still displayed using default one. I checked module parameters and there is none that allows to block summary from displaying.

Tell me, is it any way to do it? I checked new's code and tried to make some changed, but I didn't archieve anything. Whole task would be simple, if it regarded diffrent articles, cause then I could use diffrent templates. However here, at one page the article must have both summary and details (with "more" link) and at the other page same article must display only details.

Any solution how to do this? Would be very grateful for hints.

Regards,
Dave
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News module: displaying only details

Post by Dr.CSS »

Make a new summary template and remove the logic for the summary, then call that template in News tag, calling a summary template or not the default behavior is to show the summary, if no summary template is called it uses the default summary template...
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: News module: displaying only details

Post by Wishbone »

In the default summary template, it says: If no summary, show the details. In your case, do as the good Doctor suggested above and just show the details. Even if you don't change the summary template, just don't fill out the summary field when editing news articles.
Post Reply

Return to “Modules/Add-Ons”