check active language

Author Message

Robert Malevic

Monday 05 January 2009 5:56:25 am

Hi All,

I want to add two hyperlinks to an external site in a template:

How do I check the which language is selected by a visitor in eZ Publish?

Depending on the selected language I want to link to an external site:
http://www.exteralsite.com/langugage1/ or
http://www.exteralsite.com/langugage2/

Thanks for your help!

Ivo Lukac

Monday 05 January 2009 7:59:15 am

Hello Robert,

Look at access_type variable:

http://ez.no/doc/ez_publish/technical_manual/4_0/templates/the_pagelayout/variables_in_pagelayout

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

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 19:38:39
Script start
Timing: Jan 18 2025 19:38:39
Module start 'layout'
Timing: Jan 18 2025 19:38:39
Module start 'content'
Timing: Jan 18 2025 19:38:40
Module end 'content'
Timing: Jan 18 2025 19:38:40
Script end

Main resources:

Total runtime0.8860 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 587.9063152.6250
Module start 'layout' 0.00480.0023 740.531339.4453
Module start 'content' 0.00710.8761 779.9766523.1875
Module end 'content' 0.88320.0027 1,303.16418.3281
Script end 0.8860  1,311.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3308160.0002
Check MTime0.00130.1429160.0001
Mysql Total
Database connection0.00060.072810.0006
Mysqli_queries0.843895.2330540.0156
Looping result0.00060.0667520.0000
Template Total0.860597.120.4303
Template load0.00180.204220.0009
Template processing0.858796.911820.4293
Template load and register function0.00020.027910.0002
states
state_id_array0.00060.070410.0006
state_identifier_array0.00090.101420.0004
Override
Cache load0.00150.1659160.0001
Sytem overhead
Fetch class attribute can translate value0.00080.089120.0004
Fetch class attribute name0.00090.107030.0003
XML
Image XML parsing0.00070.077020.0003
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00070.0833170.0000
String conversion0.00000.000740.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs