Forums / Setup & design / Multi language en custom menu.

Multi language en custom menu.

Author Message

laurent le cadet

Thursday 11 August 2005 7:14:17 am

Hi,

I made a custom menu to have a drop down list :


<div class="isuga">
<form action="" method="get">
<select name="l_isuga" id="l_isuga" onchange="window.location=this.form.l_isuga.options[this.form.l_isuga.selectedIndex].value;">
                  <option value="" selected="selected">----------------------------------------------</option>
{section name=isuga loop=fetch( content, list, hash( parent_node_id, 102 ) )}
                  <option value="{$:item.url}">{$:item.name}</option>
{/section}
</select>
</form>
</div>

It's ok but as I have a multilanguage site, this way, it can't be used only for the default language.

What must I do with the value {$:item.url} to print a good URL (/fr/my_url or /en/my_url) ?

The name {$:item.name} in the dropdown list is translated but the URL is wrong.

Yhanks.

Laurent

Hans Melis

Thursday 11 August 2005 7:53:01 am

Hi,

ezurl should catch that one:

<option value={$:item.url|ezurl}>{$:item.name|wash}</option>

Yes, the double quotes have been left out intentionally as ezurl adds them, unless you call it with |ezurl(no).

Does that work?

Hans
http://blog.hansmelis.be

laurent le cadet

Thursday 11 August 2005 8:05:29 am

Hi Hans,

You smarter than me ;)

Thanks

Laurent

laurent le cadet

Thursday 11 August 2005 8:09:49 am

just one more thing...

How can I dothe same with a singleimage

<a href="/espace_etudiants"><img src={"images/une_etudiants.jpg"|ezdesign} alt="Espace étudiants" /></a>

Hans Melis

Thursday 11 August 2005 8:15:09 am

It's not entirely clear to me what you want to do, but I guess you want to change the url around the image :)

Fairly similar to the above solution:

<a href={"/espace_etudiants"|ezurl}><img... /></a>

Hans
http://blog.hansmelis.be

laurent le cadet

Thursday 11 August 2005 8:17:41 am

You are right again.

Many thanks.

Laurent

laurent le cadet

Wednesday 17 August 2005 5:55:20 am

Hi again,

I still need some help with the different langage.
I have images which are background of a <div> and this images are title of folders (just for a better design).
Is it possible to make a {swich} around the <div> tags based on the siteaccess to make differents {case} ?

Regards.

Laurent

eZ debug

Timing: Jan 18 2025 14:54:16
Script start
Timing: Jan 18 2025 14:54:16
Module start 'content'
Timing: Jan 18 2025 14:54:18
Module end 'content'
Timing: Jan 18 2025 14:54:18
Script end

Main resources:

Total runtime1.7321 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 589.1406180.8359
Module start 'content' 0.00831.5981 769.9766593.6563
Module end 'content' 1.60640.1256 1,363.6328341.0938
Script end 1.7320  1,704.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00490.2830210.0002
Check MTime0.00160.0939210.0001
Mysql Total
Database connection0.00140.079010.0014
Mysqli_queries1.639394.64302060.0080
Looping result0.00200.11442040.0000
Template Total1.684397.220.8422
Template load0.00260.150920.0013
Template processing1.681797.092320.8408
Template load and register function0.00010.008110.0001
states
state_id_array0.00170.095710.0017
state_identifier_array0.00150.086320.0007
Override
Cache load0.00230.1303480.0000
Sytem overhead
Fetch class attribute can translate value0.00170.097330.0006
Fetch class attribute name0.00170.099690.0002
XML
Image XML parsing0.00180.104730.0006
class_abstraction
Instantiating content class attribute0.00000.0019140.0000
General
dbfile0.00690.3982320.0002
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs