Multilanguage site mixes contents

Author Message

Ted Striker

Tuesday 03 February 2009 3:03:31 pm

Hi,

I have a site developed in eZ 3.9, that uses two different languages english and spanish. There are some articles that are translated into both languages and other articles that are published only in spanish.

Problem is that when I search for articles in one of the sites and show them in the site, they mix up, I mean both artickle and its traslation show in the page.

I use a simple code to filter articles:

{let articles=fetch(content, list, hash(parent_node_id, $node.node_id, only_translated, true(), depth, 0, limit, 5, class_filter_type, include, class_filter_array, array('article'), attribute_filter, array( array('article/published', '<', currentdate()) ), sort_by, array('attribute', false(), 'article/published') ) )}

Unfortunately this code will return both spanish and english articles mixed.

Am I doing something wrong?

Can you feel it Mr. Anderson? Closing in on you? Oh I can, I really should thank you after all. It was, after all, it was your life that taught me the purpose of all life. Purpose of life is to end.

André R.

Wednesday 04 February 2009 1:46:22 am

That depends on your site.ini settings ([RegionalSettings] SiteLanguageList and maybe ShowUntranslatedObjects).

btw: its probably more efficient to sort / filter by object published time instead of object attribute, IF you have setup workflow to modify object publish time anyway.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.