Page 1 of 1

News module driving me insane--Sloved

Posted: Mon May 10, 2010 4:11 pm
by The Shadow
hi all, I am new to the forums and to CMSMS.  Let  me start off first by saying that I am absolutely loving CMSMS, I find it to be very straight forward and intuitive; until I got to the news section.  

I was able to customize the summary template pretty easily, and after many headaches I finally found how to customize the add article field by editing the editarticle.tpl file.  I kept editing the form template, but that did nothing.  

Currently on the last 3 items are being displayed and I want all of them to be displayed.  I am also extremely frustrated with how to sort the items being displayed on my web site.  I want the items to be displayed ascending, ie. the events  that are coming up, not by when the events where published.  Then I want events to automatically be deleted once they're over.

Could some please help me with this?

Re: News module driving me insane

Posted: Mon May 10, 2010 4:52 pm
by Rolf
Hello The Shadow

Welcome at the CMSMS forum

You can change template in the backend. You will find tabs with templates in the News admin. No need to change any files!

In the help section of the News module you will find more info on how to call the module.
By putting only the {news} tag in a page, all articles will be shown in summary mode.

Hope this helps you getting started.

Reg. Rolf  :)


ps. Do you have Admin permissions? Can you see the template tabs in the first place??

Re: News module driving me insane

Posted: Mon May 10, 2010 5:19 pm
by The Shadow
Thanks Rolf, I have full admin access.  I went to the Form Template tab in the news module, I made several changes, but they never showed up.  Thats why I had to edit the .tpl file.  I've got the news articals being displayed on my web site, i just want all of them to be displayed not just the last 3 items.  I also want to change the way the they are being ordered.

Re: News module driving me insane

Posted: Mon May 10, 2010 5:36 pm
by Rolf
The Shadow wrote: I have full admin access.  I went to the Form Template tab in the news module, I made several changes, but they never showed up.  Thats why I had to edit the .tpl file. 
It is possible in the {news} call a different template is called, there the changes aren't visible...
{news summarytemplate="the-wrong-one" detailtemplate="the-wrong-one"}
The Shadow wrote: I've got the news articals being displayed on my web site, i just want all of them to be displayed not just the last 3 items. 
Perhaps the tag used, containes number="3" - delete this.
The Shadow wrote: I also want to change the way the they are being ordered.
News Module Help Page wrote: # (optional) sortasc="true" - Sort news items in ascending date order rather than descending.
# (optional) sortby="news_date" - Field to sort by. Options are: "news_date", "summary", "news_data", "news_category", "news_title", "news_extra", "end_time", "start_time", "random". Defaults to "news_date". If "random" is specified, the sortasc param is ignored.
®

Re: News module driving me insane

Posted: Mon May 10, 2010 5:56 pm
by The Shadow
I found my problem, I was testing the news on the default template on my test server.  Once I tried with my own template everything worked fine.  I added sortasc="true" to my {news} in my template, and its now looking great.  I still can't get the changes to the form template to show up without editing the .tpl file.

Re: News module driving me insane

Posted: Mon May 10, 2010 6:34 pm
by The Shadow
Okay, I've pretty much got it the way I want it, expect for I want to truncate the year from being displayed.  I just want the month and the date. 

Re: News module driving me insane

Posted: Mon May 10, 2010 7:16 pm
by Rolf
Default News uses the global date setting of the CMS: {$entry->postdate|cms_date_format}

In the template you can change this to {$entry->postdate|date_format:'parameters'}
The parameters you want to fill in, you can find here: http://php.net/manual/en/function.strftime.php

Reg. Rolf

Re: News module driving me insane

Posted: Mon May 10, 2010 8:00 pm
by The Shadow
Thanks for all of your help Rolf

Re: News module driving me insane

Posted: Mon May 10, 2010 8:16 pm
by Rolf
The Shadow wrote: Thanks for all of your help Rolf
You are welcome  :)
Please put [Solved] in the title of the first post.
You can use 'Modify Post' for this.

®