Link node has an alias? Treemenu fetches alias, not URL

Author Message

Philipp Simon

Wednesday 21 June 2006 2:14:44 am

Hi again,

just wanted to add a few internal links, but a have a strange problem.

Building following node structure:
/company (folder)
/company/profile (article)
/company/contact (link)

The link (should) lead to
/contact

But he builds
/company/contact

Is this a bug?

Using the link object with following code does not work:
ezNode://2

Is it possible to build a link using a node id, so it's not bind to the alias. (But it should use the alias of the node) So I can change alias, an this link will still work.

Phil

Philipp Simon

Friday 23 June 2006 2:10:20 am

Nobody had this problem?

After writing this post, I realised, that on admin site, I need the alias, to edit the link object. But on public site, he should take the link given, not the alias...

Phil

Philipp Simon

Sunday 25 June 2006 2:31:53 am

I took a closer look on this, and I realised, that I have to do the link check on my own. But unfortunately, treemenu() doesn't give me any info about the class type...

I wanted to add the same as for the top menu, so:

            {section show=eq( $menu.object.content_class.identifier, "link" )}
                <a {$menu.is_selected|choose( '', 'class="selected"' )} href={$menu.data_map.location.content|ezurl}>{$menu.object.name|wash}|shorten( 25 )}</a>
            {section-else}
                <a {$menu.is_selected|choose( '', 'class="selected"' )} href={$menu.url_alias|ezurl}>{$menu.text|shorten( 25 )}</a>
            {/section}

But when using treemenu, I don't have access to the $menu.object.content_class.identifier. Any ideas? Do I really have to replace treemenu()?

Phil

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 31 2025 01:35:16
Script start
Timing: Jan 31 2025 01:35:16
Module start 'layout'
Timing: Jan 31 2025 01:35:16
Module start 'content'
Timing: Jan 31 2025 01:35:16
Module end 'content'
Timing: Jan 31 2025 01:35:16
Script end

Main resources:

Total runtime0.0245 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.2734151.2266
Module start 'layout' 0.00580.0044 739.5000220.7188
Module start 'content' 0.01020.0126 960.2188997.8203
Module end 'content' 0.02280.0017 1,958.039129.9922
Script end 0.0245  1,988.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002811.2136140.0002
Check MTime0.00114.4957140.0001
Mysql Total
Database connection0.00093.838910.0009
Mysqli_queries0.002811.341830.0009
Looping result0.00000.077710.0000
Template Total0.00125.010.0012
Template load0.00093.769910.0009
Template processing0.00031.149410.0003
Override
Cache load0.00072.673910.0007
General
dbfile0.00114.497780.0001
String conversion0.00000.040840.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