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.

eZ debug

Timing: Jan 19 2025 08:56:12
Script start
Timing: Jan 19 2025 08:56:12
Module start 'layout'
Timing: Jan 19 2025 08:56:12
Module start 'content'
Timing: Jan 19 2025 08:56:12
Module end 'content'
Timing: Jan 19 2025 08:56:12
Script end

Main resources:

Total runtime0.0195 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.1563152.6250
Module start 'layout' 0.00610.0033 741.781339.4609
Module start 'content' 0.00940.0077 781.242293.4453
Module end 'content' 0.01700.0024 874.687534.3047
Script end 0.0195  908.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002914.7882140.0002
Check MTime0.00136.6519140.0001
Mysql Total
Database connection0.00105.128510.0010
Mysqli_queries0.002613.413830.0009
Looping result0.00000.086710.0000
Template Total0.002010.110.0020
Template load0.00115.410710.0011
Template processing0.00094.605610.0009
Override
Cache load0.00083.878810.0008
General
dbfile0.002010.373180.0003
String conversion0.00000.120940.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.0002 secs