Forums / Setup & design / Class-specific view in treemenu

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

eZ debug

Timing: Jan 19 2025 06:01:15
Script start
Timing: Jan 19 2025 06:01:15
Module start 'content'
Timing: Jan 19 2025 06:01:15
Module end 'content'
Timing: Jan 19 2025 06:01:15
Script end

Main resources:

Total runtime0.2938 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0129 588.9688180.8359
Module start 'content' 0.01290.0198 769.804797.9922
Module end 'content' 0.03270.2610 867.7969528.3047
Script end 0.2937  1,396.1016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00401.3510200.0002
Check MTime0.00130.4517200.0001
Mysql Total
Database connection0.00260.889110.0026
Mysqli_queries0.214973.15781410.0015
Looping result0.00210.71381390.0000
Template Total0.260588.710.2605
Template load0.00080.284310.0008
Template processing0.259788.397510.2597
Override
Cache load0.00060.193010.0006
Sytem overhead
Fetch class attribute can translate value0.00080.258410.0008
XML
Image XML parsing0.00030.108610.0003
General
dbfile0.01595.4251200.0008
String conversion0.00000.002430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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