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.
News Module. How To Display Last News Detailed?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: News Module. How To Display Last News Detailed?
for limiting the results to the N newest results, use the number parameter.
i.e.:
{news number='5'}
i.e.:
{news number='5'}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: News Module. How To Display Last News Detailed?
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
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
Last edited by Badinage on Fri Jul 13, 2007 6:35 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: News Module. How To Display Last News Detailed?
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.
Then you'll be able to use something like {news summarytemplate='myfunkysummarytemplate' number='5'} to display what you want.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: News Module. How To Display Last News Detailed?
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.
see http://smarty.php.net/
Also:
The {get_template_vars} tag is very handy when debugging templates.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: News Module. How To Display Last News Detailed?
*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 :3calguy1000 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.
Re: News Module. How To Display Last News Detailed?
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...