Forums / Setup & design / Tool Bar ---make the title a link

Tool Bar ---make the title a link

Author Message

Kevin Myles

Monday 12 July 2004 2:46:20 pm

I am trying to modify my toolbars so that for tools that are node lists, the title is a link to that Node_ID/folder (as selected in the toolbar admin), so you can click on the toolbar title and see all the articles of the selected node, instead of just the 5 in the toolbar.
i've been playing around with toolbar/full/node_list.tpl but no matter what I try, the link is just to the main page

{cache-block keys=$tool_id}
{default limit=5} {section show=or($show_subtree|count_chars()|eq(0), $requested_uri_string|begins_with( $show_subtree ))}
{section show=$sort_by|count|eq( 0 )}{set sort_by='published'}{/section}
{let node_list=cond( $treelist_check|eq( 'yes' ),
                         fetch( content, tree, hash( parent_node_id, $parent_node,
                                limit, $limit,
                                class_filter_type, exclude,
                                class_filter_array, array( 'folder' ),
					            sort_by, array( $sort_by, false() ) ) ),
                     fetch( content, list, hash( parent_node_id, $parent_node,
                            limit, $limit,
                            class_filter_type, exclude,
                            class_filter_array, array( 'folder' ),
				            sort_by, array( $sort_by, false() ) ) ) )}
<div class="toollist">
    <div class="toollist-design">
    <h2><a href={$node:item.url_alias|ezurl}>{$title}</a></h2>
    <div class="content-view-children">
    {section name=Node loop=$node_list sequence=array(bglight,bgdark)}
        {node_view_gui view=listitem content_node=$Node:item}

i modified the code by putting in

<a href={$node:item.url_alias|ezurl}> </a>

I've just been palying around with the operator, and no matter what I put infront of item.url_alias|ezurl , the link just goes to the main front page. I've been at this for a day and a half, so any help is much appreciated.
Many thanks in return for help!

Bruce Morrison

Monday 12 July 2004 4:25:09 pm

Hi Kevin

You need to retrieve the node first

Try:

{let node=fetch(content,node,hash(node_id,$parent_node))}
<a href={$node.url_alias|ezurl}>{$title}</a>
{/let}

Cheers
Bruce http://www.designit.com.au/

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Kevin Myles

Monday 12 July 2004 8:47:04 pm

Bruce, thanks for your reply, mate.
I've tried my best to use your code, but it's not working. I think you're right that i need to add a fetch for the node, but i wonder if the syntax is wrong somehow?

I've tried tweaking it several times (moving the {/let}, droping the "$" from the fetch.

in my full folder view template override, i know this retrieves the subfolder names of the containing folder

{section name=Folder loop=$folder_list}

should i add something like this? it seems like a strech, but again i can't make your suggestion work. any ideas?

Anyway, thanks again for your support!

Bruce Morrison

Monday 12 July 2004 9:19:50 pm

I've edited the original message and fixed up some mistakes.

I really should have some coffee before I do _anything_ in the morning ;)

Cheers
Bruce http://www.designit.com.au/

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Kevin Myles

Tuesday 13 July 2004 8:23:42 am

Bruce,
thank you so much. it works perfectly now.
Cheers, Kevin.

eZ debug

Timing: Jan 19 2025 06:30:31
Script start
Timing: Jan 19 2025 06:30:31
Module start 'content'
Timing: Jan 19 2025 06:30:32
Module end 'content'
Timing: Jan 19 2025 06:30:32
Script end

Main resources:

Total runtime1.3365 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 588.9688180.8359
Module start 'content' 0.00681.1748 769.8047569.8359
Module end 'content' 1.18150.1549 1,339.6406337.3984
Script end 1.3365  1,677.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00500.3769210.0002
Check MTime0.00150.1131210.0001
Mysql Total
Database connection0.00090.065010.0009
Mysqli_queries1.246893.28342000.0062
Looping result0.00260.19111980.0000
Template Total1.300797.320.6504
Template load0.00290.214720.0014
Template processing1.297997.105020.6489
Template load and register function0.00020.013810.0002
states
state_id_array0.00150.110310.0015
state_identifier_array0.00220.162720.0011
Override
Cache load0.00250.1893360.0001
Sytem overhead
Fetch class attribute can translate value0.00140.105230.0005
Fetch class attribute name0.00130.097460.0002
XML
Image XML parsing0.00090.064630.0003
class_abstraction
Instantiating content class attribute0.00000.001270.0000
General
dbfile0.00710.5314270.0003
String conversion0.00000.000630.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs