Hi,
I've created the news section of my CMSMS MLE site using the advice from Alby (Tips and Trick #5), however now I have a problem.
For the News page I have a category list of each year gone by within the sidebar. Using english US as an example, each catergory is set up as follows:
2005-en_US
2006-en_US
2007-en_US
with the code for the template
{news browsecat="1" category="2005-$lang, 2006-$lang, 2008-$lang"}
Because the language apend is set up as categories it displays with the current language apended to each year. So on the site it displays exactly the same:
2005-en_US
2006-en_US
2007-en_US
All I want is the year listed 2005, 2006, 2007 without the user seeing the additional language apended to the category.
Is there a way I can hide the "-en_US" (or whatever language is currently selected) ?
I've tried a parent child set up but that didnt work... so maybe something in the Browse Category template?
Any help would be great,
Thanks
Using CMSMS MLE 1.2.3 "Black Rock"
[SOLVED] MLE News with Browse Catergory list
[SOLVED] MLE News with Browse Catergory list
Last edited by jswags on Tue Jan 29, 2008 10:42 am, edited 1 time in total.
Re: MLE News with Browse Catergory list
Other tipjswags wrote: All I want is the year listed 2005, 2006, 2007 without the user seeing the additional language apended to the category.
Is there a way I can hide the "-en_US" (or whatever language is currently selected) ?
I've tried a parent child set up but that didnt work... so maybe something in the Browse Category template?
For news language subcategory:
1. Create top category with language ONLY (en_US, it_IT, ...)
2. Create subcategories of this 2005, 2006, ... (ie. en_US|2005, en_US|2006, ...)
3. Call News module with (this call display all subdirectory of $lang):
Code: Select all
{cms_module module="News" browsecat="1" category="$lang | *"}
Last edited by alby on Sun Jan 27, 2008 9:40 pm, edited 1 time in total.
Re: MLE News with Browse Catergory list
Hi Alby,
Thanks for the reply and almost there For other users I'll just reiterate what we've worked out so far:
Created Category list with children as follows:
en_US
> 2005
> 2006
> 2008
it_IT
> 2005
> 2006
> 2008
On template within the side bar we call the news module with language category and only its children using the *:
{cms_module module="News" browsecat="1" category="$lang*"}
As a note I've created a page called News and within Content call the latest news year:
{cms_module module="News" category="$lang*2008"}
Finally create your news in English and Italian and pop them into the correct parent language, child catergory.
The good news. When you go to the news page the sidebar shows the year with the correct amount of articles in the brackets for that language (at the moment only 2005 and 2008 have english and Italian content. Click between US and Italian to see the main news page change.
However when you click the year on the sidebar, for example 2005 and the detail page opens it shows every language entry for that year. So I see the english US and Italian entry for 2005.
I've looked at the Browse Category template. I'm thinking that the link doesnt know its looking for a child under the language category. In other words when you click 2005 the link finds all entries in the 2005 cateogry ignoring the parent language.
Where should I look to force it to check the language on the link?
Thanks again for any help.
oh and here's a link to see it in progress - Alby apologies for the Italian translation I used Babel Fish
Thanks for the reply and almost there For other users I'll just reiterate what we've worked out so far:
Created Category list with children as follows:
en_US
> 2005
> 2006
> 2008
it_IT
> 2005
> 2006
> 2008
On template within the side bar we call the news module with language category and only its children using the *:
{cms_module module="News" browsecat="1" category="$lang*"}
As a note I've created a page called News and within Content call the latest news year:
{cms_module module="News" category="$lang*2008"}
Finally create your news in English and Italian and pop them into the correct parent language, child catergory.
The good news. When you go to the news page the sidebar shows the year with the correct amount of articles in the brackets for that language (at the moment only 2005 and 2008 have english and Italian content. Click between US and Italian to see the main news page change.
However when you click the year on the sidebar, for example 2005 and the detail page opens it shows every language entry for that year. So I see the english US and Italian entry for 2005.
I've looked at the Browse Category template. I'm thinking that the link doesnt know its looking for a child under the language category. In other words when you click 2005 the link finds all entries in the 2005 cateogry ignoring the parent language.
Where should I look to force it to check the language on the link?
Thanks again for any help.
oh and here's a link to see it in progress - Alby apologies for the Italian translation I used Babel Fish
Re: MLE News with Browse Catergory list
I see ....jswags wrote: Where should I look to force it to check the language on the link?
News loses category "parent": en_US | 2005 -> 2005
- backup action.browsecat.php in News folder
- open this file with an editor, search (about #51):
and modify in:$parms['category'] = $row['news_category_name'];
Alby$parms['category'] = $row['long_name'];
Last edited by alby on Mon Jan 28, 2008 4:56 pm, edited 1 time in total.
Re: [SOLVED] MLE News with Browse Catergory list
Alby, great news as you'll see I've added [SOLVED] to the Subject line
Superb, thanks so much for your help, I really appreciate it!
Superb, thanks so much for your help, I really appreciate it!