Page 1 of 1
News Module. How To Display Last News Detailed?
Posted: Wed Jun 27, 2007 2:52 pm
by URAN
How To Display Last News Detailed?
I would like to have one or two last news to be shown detailed above other`s news list.
If it possible with this module?
Also, I would like to manager number of news at list. For example, 10 last news are shown on the main page, other ones are at the News Archive or News Page.
Re: News Module. How To Display Last News Detailed?
Posted: Wed Jun 27, 2007 2:59 pm
by calguy1000
for limiting the results to the N newest results, use the number parameter.
i.e.:
{news number='5'}
Re: News Module. How To Display Last News Detailed?
Posted: Fri Jul 13, 2007 6:30 pm
by Badinage
Hello new forum member here, been digging into learning CMS made simple this last month for my personal web site. Anyway, I have a question about the news module thats pretty much the same as URAN's so I thought I would just bump this thread as I hate to make new ones as a new member >_<
Anyway what I want for my site: I will keep the news module below the navigation using the summery template, but on my home page I want it to use the detail tempate to display the latest 6 articles one above the other like how it does with the summery template currently.
I cannot for the life of me find where it calls the templates. I tried the trick I saw in another thread of having "detailpage="home"" but it only has content on it if I navigate to it from the "more" link where the summery is shown, its blank if I go to it through the navigation. (edit) I also tried something I thought of to have the news module call include "summarytemplate="detailtemplate.tpl"" but this just brings up errors on the page. I guess the detail template maybe does not have that name?
Any help would be much appreciated ^ ^, this is my second stint into using CMS's, the last being when I tried to learn Nuke 3 years ago.
My page *is* up and you can see it at
www.pyoko.org/~akbadinage
Re: News Module. How To Display Last News Detailed?
Posted: Fri Jul 13, 2007 8:29 pm
by calguy1000
I am pretty sure that all of the information available to the news detail template is also available in the summary template, so it's just a matter of modifying your summary template to display the same things that the detail template does, except in a foreach loop (left as an excercise to the user)
Then you'll be able to use something like {news summarytemplate='myfunkysummarytemplate' number='5'} to display what you want.
Re: News Module. How To Display Last News Detailed?
Posted: Fri Jul 13, 2007 8:30 pm
by calguy1000
as an added asside.... as this link isn't mentioned as prominently as it should be.... You should thoroughly read (and comprehend) the smarty manual before diving into heavy template modifications.
see
http://smarty.php.net/
Also:
The {get_template_vars} tag is very handy when debugging templates.
Re: News Module. How To Display Last News Detailed?
Posted: Sun Jul 15, 2007 12:52 am
by Badinage
calguy1000 wrote:
I am pretty sure that all of the information available to the news detail template is also available in the summary template, so it's just a matter of modifying your summary template to display the same things that the detail template does, except in a foreach loop (left as an excercise to the user)
Then you'll be able to use something like {news summarytemplate='myfunkysummarytemplate' number='5'} to display what you want.
*hugs!* Thanks a million it worked. I made a new template, copied the summary template into it, and added the detail content from the detail template. After some fiddling, its just what I need. I'll be messing with it more soon, but yeah, I was totally looking in teh wrong places to try to solve this little thing :3
Re: News Module. How To Display Last News Detailed?
Posted: Wed Jul 18, 2007 4:11 am
by Dr.CSS
If you go to Extensions > Modules and click the name of the module or Help to the right you get the parameters the module takes...