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.