Class-specific view in treemenu

Author Message

Felix Laate

Friday 22 October 2004 12:19:29 am

Hi all!

I have this treemenu:

	{let docs=treemenu( $module_result.path,
                    $module_result.node_id,
                    array( 'folder', 'link' ), 0, 5 )
                    depth=1}
        		<ul>
        			{section var=menu loop=$:docs last-value}
            		{section show=and( $menu.last.level|eq( $menu.level ), $menu.number|gt( 1 ) )}
                		</li>
            		{section-else}
            		{section show=and( $menu.last.level|gt( $menu.level ), $menu.number|gt( 1 ) )}
                		</li>
                    		{"</ul>
                		</li>"|repeat(sub( $menu.last.level, $menu.level ))}
            		{/section}
            		{/section}

            		{section show=and( $menu.last.level|lt( $menu.level ), $menu.number|gt( 1 ) )}
                		<ul>
                   		<li class="menu-level-{$menu.level}">
            		{section-else}
                		<li class="menu-level-{$menu.level}">
            		{/section}

            		<img src="{"dot_grey.jpg"|ezimage(no)}" name="image{$menu.number}" />&nbsp;<a {$menu.is_selected|choose( '', 'class="selected"' )} href={$menu.url_alias|ezurl} onMouseOver="changeImages('image{$menu.number}', 'image1on')" onMouseOut="changeImages('image{$menu.number}', 'image1off')">{$menu.text|shorten( 25 )}</a>

            		{set depth=$menu.level}
        			{/section}
           				</li>

        			{section show=sub( $depth, 0 )|gt( 0 ) loop=sub( $depth, 0 )}
            			</ul>
        				</li>
        			{/section}
					
        				<li class="menu-level-0"><img src="{"dot_grey.jpg"|ezimage(no)}" name="image100" />&nbsp;<a href="http://www.rygjabo.no/cgi-bin/stavanger/stvg_guestbook.cgi" onMouseOver="changeImages('image100', 'image1on')" onMouseOut="changeImages('image100', 'image1off')" target="_new">Gjestebok</a></li>

					<p>&nbsp;</p>
						
						</ul>

					{/let}

I want to have all folders and links shown. Folders should as they are (a link to the line view of folders). But the links should be links directly to whatever the URL is, NOT to the line view of the link.

I would be happy for any help..!

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Ekkehard Dörre

Friday 22 October 2004 2:39:50 am

Hi,
an easy way without templating is the 3.4 top right bottom toolbar. There you can create via admin links.

Another way: take a switch for the class and when link then something like this:
<a href="{$:item.contentobject_version_object.data_map.link.content}" target="_blank" class="menu">{$:item.name|wash}</a>
(You need the pure link.content from the link class, try {the variable is here|attribute(show,3)}

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.