Page 1 of 1

News module - articles in two languages can I select by category?

Posted: Fri Nov 12, 2010 7:13 am
by rwegner
I am using CMS Made Simple v1.8.2

I am making a bilingual site using two different templates one for the english pages and the other for the french pages.

I am using the News module to add News articles to the left sidebar.  I would like to create News articles in both languages and have them display on the appropriate pages.  If I create two different categories news_en and news_fr is there a way that I can check for the category in the page template and only display the news items in the appropriate language?

The URL to the web site is http://www.chiropontiac.ca/

Any suggestions on how to accomplish this would be greatly appreciated.

Thanks,
Richard

Re: News module - articles in two languages can I select by category?

Posted: Fri Nov 12, 2010 11:57 am
by opawaldburger
Take a look in the help section of the module!

i.e.:

Code: Select all

{news category="news_en"}
cheers,
opa

Re: News module - articles in two languages can I select by category?

Posted: Fri Nov 12, 2010 6:01 pm
by rwegner
Thanks opa, that is just what I needed.

I read the help section but it was not completely clear to me where to put the code.

Now that I understand that I can just replace the standard {news} code with {news category="news_en"} in the english template and {news category="news_fr"} in the french template everything is working as I had hoped.

Thanks again,
Richard

Re: News module - articles in two languages can I select by category?

Posted: Fri Nov 12, 2010 11:17 pm
by opawaldburger
No problem! Glad to help.

It's always the same scheme. So when you use other modules, those additional parameters are inserted directly into the tag, since they are all rendered with smarty!

cheers!