hyperlink - Dynamic url and title for links in eZ Publish -


i using code in menu:

{def $menu = treemenu( $module_result.path, false(), array( 'folder', 'article', 'page', 'listing', 'blog' ), 1, 2, true )} {if $menu}     <a href={$module_result.path[1].url_alias|ezurl} class="leftnavtop{cond(eq($current_node.node_id, $module_result.path[1].node_id), 'on', '')}">{$module_result.path[1].text|shorten(24)|wash()}</a>     {foreach $menu $key => $item}         <a class="{concat('leftnav', cond($item.level|eq(1), '2', ''), cond($item.is_selected, 'on', ''))}" href={$item.url_alias|ezurl()}>{$item.text|shorten(32)|wash()}</a>     {/foreach} {/if} 

with name of link taken "short_name" , url "short_name".

is possible change little bit code have name of link taken "name" , url stay "short_name".

name: name of link

short name: url example

final solution: name of link (but goes www.mysite.com/url-example)

hope explain good.

i try few solutions had no luck.

thanks in advance

i don't typically generate menu treemenu(), not know if have access data_map $item. said, however, try this:

{def $menu = treemenu( $module_result.path, false(), array( 'folder', 'article', 'page', 'listing', 'blog' ), 1, 2, true )} {if $menu}     <a href={$module_result.path[1].url_alias|ezurl} class="leftnavtop{cond(eq($current_node.node_id, $module_result.path[1].node_id), 'on', '')}">{$module_result.path[1].text|shorten(24)|wash()}</a>     {foreach $menu $key => $item}         <a class="{concat('leftnav', cond($item.level|eq(1), '2', ''), cond($item.is_selected, 'on', ''))}" href={$item.url_alias|ezurl()}>{$item.data_map.name.content|wash()}</a>     {/foreach} {/if} 

like said, don't know sure if have access data_map $item, if should able true name through it.


Comments