$module_result.path: translated names?

Author Message

Kai Duebbert

Monday 31 March 2003 2:09:39 am

The following code only shows the original (English) names not the translated ones:
------------------------
{section name=Path loop=$module_result.path}
{$Path:item.text}
{/section}
-------------------------

As far as I can see there is no direct solution (only "text", "url", "url_alias" and "node_id" (if there's a parent one) are available). Any ideas for a workaround to get a properly translated path? Thanks!

(This should be added as a feature because for multi-language sites the path text is needed in a translated version!)

Jan Borsodi

Tuesday 01 April 2003 6:15:44 am

You can fetch the node yourself and go over the parent list, use:
{section show=is_set($DesignKeys:used.node)}
{let node=fetch(content,node,hash(node_id,$DesignKeys:used.node))}
{section name=Node loop=$node.path_array}
{section-exclude match=array(1,2)|contains($:item)} {* Skip root nodes *}
{* Replace the next line with something that fetches translations *}
{fetch(content,node,hash(node_id,$:item)).name}
{/section}
{/let}
{section-else}
{* Show normal path *}
{/section-else}

We are currently planning to let templates override the returned path from module views, that way you could override the path returned from content/view/. But this is something for a future release.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

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 30 2025 19:44:33
Script start
Timing: Jan 30 2025 19:44:33
Module start 'layout'
Timing: Jan 30 2025 19:44:33
Module start 'content'
Timing: Jan 30 2025 19:44:33
Module end 'content'
Timing: Jan 30 2025 19:44:33
Script end

Main resources:

Total runtime0.0261 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.2500151.2266
Module start 'layout' 0.00620.0042 739.4766220.7031
Module start 'content' 0.01040.0141 960.1797997.7891
Module end 'content' 0.02450.0016 1,957.968829.9922
Script end 0.0261  1,987.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002911.2049140.0002
Check MTime0.00114.3280140.0001
Mysql Total
Database connection0.00083.194610.0008
Mysqli_queries0.003111.798530.0010
Looping result0.00000.038410.0000
Template Total0.00114.410.0011
Template load0.00083.218410.0008
Template processing0.00031.111410.0003
Override
Cache load0.00062.168110.0006
General
dbfile0.00186.996580.0002
String conversion0.00000.037440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs