Page 1 of 1

News help.

Posted: Thu Mar 04, 2010 9:09 am
by Adam
Hi all,

I am new to using CMS made simple so please be gentle  :)

I have recently taken over maintaining my companies website and have been given the task of creating a news page, I have so far been able to show the articles in a widgetblock on a right hand column.

I have unfortunately got stuck on trying to get categories to show up on the main body of the page.

What i am trying to achieve is to have 3 recent articles shown on the right hand side and then the categories visible at the bottom of the main body.

Can any of you point me in the right direction for what code i should used to make the categories show where i would like them to be?

Kind Regards,

Adam

Re: News help.

Posted: Thu Mar 04, 2010 9:43 am
by peterbus
Adam,

To show your categories use  {news browsecat="1"}. Put this on the right place in your template/stylesheet.



If you want to show a certain number of news articels  put something like this in your template

{* Start News, stylesheet  "Module: News" *}
         
              Nieuws
              {cms_module module="news" number="3" detailpage="nieuws" moretext="Lees verder ..." }
           

Good luck


peter

Re: News help.

Posted: Thu Mar 04, 2010 9:49 am
by Adam
Peter,

Thanks for your rapid response. im sure i will have fun today trying to make the page look how my lovely marketing company want it to.

Regards

Adam

Re: News help.

Posted: Thu Mar 04, 2010 11:01 am
by Adam
Few more questions... Sorry

1) Is there a way of showing related articles or even just other articles in the category if you have one open? so under the main body of text it would show say 3 - 4 articles from the same category?

2) if i set start and end dates can you have a block that would allow you to search by article date or month? so have Archive and then Jan / Feb / Mar/ Apr etc in the block and then people can go to all news in say feb.

Regards,

Adam.

Re: News help.

Posted: Thu Mar 04, 2010 12:37 pm
by peterbus
Adam,

1) Is there a way of showing related articles or even just other articles in the category if you have one open? so under the main body of text it would show say 3 - 4 articles from the same category?

Try {news browsecat="1" number="4"}. If I'm not mistaking this will give a list of 4 articles per category. Is this what you mean?

2) if i set start and end dates can you have a block that would allow you to search by article date or month? so have Archive and then Jan / Feb / Mar/ Apr etc in the block and then people can go to all news in say feb.

I don't know. Will look in to it.

Re: News help.

Posted: Thu Mar 04, 2010 1:36 pm
by Adam
Peter, with number one, i mean if i was say reading "article 1"  would i be able to have  a block below that says " related articles" as title, and then 3 similar stories inside it. so if the main article was about say the econemy you would have 3 similar articles under it.

a bit like if you were on a shopping site and bought something like a pool, a related product would be a filter or a pump etc etc

Re: News help.

Posted: Thu Mar 04, 2010 3:04 pm
by peterbus
Adam,


A quick and rough solution:  make a new detailtemplate in the newsmodule. Copy/paste the code from the original detailtemplate in to the new one. Than add a piece of code from the summarytemplate (see underneath) at the end of code from the new template.

{foreach from=$items item=entry}



moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}


{/foreach}


It does the job but you should play around a bit with categories and stuff.  I'll look into the matter later on. Duty calles!!


Maybe this is usefull?  http://forum.cmsmadesimple.org/index.ph ... .html 

Re: News help.

Posted: Thu Mar 04, 2010 3:39 pm
by Adam
guessing ive done it wrong as nothing has happend when i add the code into a new template

Re: News help.

Posted: Thu Mar 04, 2010 5:58 pm
by peterbus
did you made the new template the standard one (red cross)?

Or did you put in your news tag that de the detailemplate should be xxxx?

Have you seen/read the news module help ? There you will find al kind of calls you can use in the {news} "tag". Things like {news detailtemplate="xxxxx" } can be foud there.