Multilanguage site: exclude pages from a language version

Author Message

Valentina Ferrari

Monday 11 July 2005 2:02:43 am

Hi all!
I have a problem with multilangugae site managment.

I developed my site in two languages: italian and english. I have three pages: "Company", "Portfolio" and "Job opportinities".

I wanna show all these pages in the italian version, BUT I wanna show only two pages ("Company" and "Portfolio") in the english version.

Can I do it? In which way?

Thank you
Valentina

Valentina Ferrari

Tuesday 12 July 2005 12:01:31 am

PLEASE HELP ME!

Matthew Almand

Tuesday 12 July 2005 12:21:50 am

Hi Valentina,

what you want to do is control the display of content through the language. Rather than using the menu directly for Jobs you could create it and link to it manually using:

{section show=eq(ezini('RegionalSettings','Locale'),'ita-IT')}
menu item=jobs
{/section}

that way it only shows this if the language is italian.

Valentina Ferrari

Tuesday 12 July 2005 12:39:13 am

Hi Matthew,
maybe I don't understand what you suggest.

I try to control the menu with:

{section show=eq(ezini('RegionalSettings','Locale'),'ita-IT')}
menu item=jobs
{/section}

but nothing changes.

Infact in my italian siteaccess (called "corporate") I set 'ita-IT' as Locle Regional Settings. So every nodes of the site has this feature.

Right?

Thank you,
Valentina

Matthew Almand

Tuesday 12 July 2005 12:43:56 am

are you curently generating the menu dynamically? if so then you are getting the typical array that loops through the list. Rather than including jobs within this array you remove it from the menu (or hide it by giving the anonymous user limited access to content in that folder, then you setup a manual link in the template "content/view/full/(JOB NODE HERE)" then in the template surround this link with the code above so that the template only shows the content if the regional settings are for Italian. Sorry my PHP isn't good enough to automate the process.

Kai Duebbert

Tuesday 12 July 2005 1:21:45 am

Hi,

You can use the option "only_translated" of the fetch funtion. We use it to only show articles which were translated.

E.g.:

{let articles=fetch('content', 'list',
              hash('parent_node_id', $node.node_id,       
                   'sort_by', array( 'priority', 1),              
                   'class_filter_type',  'include',                 
                   'class_filter_array', array( 'article' ),                   
                   'only_translated', true() ) )
}

[Do something with the articles (e.g. show them or create a menu with them]

{/let}

See also http://ez.no/doc/ez_publish/technical_manual/3_6/reference/modules/content/fetch_functions/list

Kai

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

eZ debug

Timing: Jan 18 2025 16:05:40
Script start
Timing: Jan 18 2025 16:05:40
Module start 'layout'
Timing: Jan 18 2025 16:05:40
Module start 'content'
Timing: Jan 18 2025 16:05:42
Module end 'content'
Timing: Jan 18 2025 16:05:42
Script end

Main resources:

Total runtime1.3707 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0099 588.1719152.6563
Module start 'layout' 0.01000.0033 740.828139.5078
Module start 'content' 0.01331.3561 780.3359541.3125
Module end 'content' 1.36930.0013 1,321.648412.0938
Script end 1.3706  1,333.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2453160.0002
Check MTime0.00140.1020160.0001
Mysql Total
Database connection0.00300.218710.0030
Mysqli_queries1.310895.6320680.0193
Looping result0.00070.0475660.0000
Template Total1.331197.120.6655
Template load0.00170.125320.0009
Template processing1.329396.984420.6647
Template load and register function0.00010.009210.0001
states
state_id_array0.00150.110710.0015
state_identifier_array0.00150.108320.0007
Override
Cache load0.00140.1041380.0000
Sytem overhead
Fetch class attribute can translate value0.00120.089230.0004
Fetch class attribute name0.00170.124160.0003
XML
Image XML parsing0.00030.022530.0001
class_abstraction
Instantiating content class attribute0.00000.000960.0000
General
dbfile0.00200.1495100.0002
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs