Node id organization does'nt work aft template code changed!

Author Message

Guilherme Longo

Friday 05 October 2007 2:00:24 am

Hi friends.
I've one simple problem with my node organization.
I was organizing my menu using priority, but was necessary make some modifications on the template code. My page is working perfect but the organization that was seted in ezwebin interface does'nt work after those changes!

I though in 2 things:

1º - Change the nodes id of my nodes and organize via template code by id order, or make some code tho show in order using their respective node id.

Somebody has some suggestion?

Thank very much!

Guilherme Longo

Monday 08 October 2007 4:23:43 am

People, i dont find nothing yet to solve my problem!

Nobody know if is possible change node id of one node already created?

and Some body knows how does work the organization by priority? wich script has the responsability to do that organization?

Great Regds;

André R.

Monday 08 October 2007 5:35:51 am

When you have problem with your own code, you will get a whole lot more answears if you post it.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Guilherme Longo

Monday 08 October 2007 6:05:30 am

I'll try to explain what I did exactly:

I have one template that show my menu:
the code is quite simple and I just added these 2 bolds line:

If I remove these 2 lines, my organization by priority works perfect.
I just want to know how does work organization by priority, I want to read the code to try understand what is happening.

Some body know in which file I can find it?

I mean for example ... /settings/organize.php !

Follow bellow the code:

<div class="topmenu-design">
<!-- Top menu content: START -->
<ul>
{def $root_node=fetch( 'content', 'node', hash( 'node_id', $indexpage ) )
$top_menu_items=fetch( 'content', 'list', hash( 'parent_node_id', $root_node.node_id, 'class_filter_array', ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ) ) )
$top_menu_items_count = $top_menu_items|count()
$item_class = array()
$current_node_in_path = cond(and($current_node_id, gt($module_result.path|count, $pagerootdepth)), $module_result.path[$pagerootdepth].node_id, 0 )}
{if $top_menu_items_count}
<b>{foreach $top_menu_items as $key => $item}</b>
<b>{if $item.node_id|ne( 187 )}</b>
{set $pagerootdepth = $root_node.depth}
{set $item_class = cond($current_node_in_path|eq($item.node_id), array("selected"), array())}
{if $key|eq(0)}
{set $item_class = $item_class|append("firstli")}
{/if}
{if $top_menu_items_count|eq( $key|inc )}
{set $item_class = $item_class|append("lastli")}
{/if}
{if $item.node_id|eq( $current_node_id )}
{set $item_class = $item_class|append("current")}
{/if}

{if eq( $item.class_identifier, 'link')}
<li id="node_id_{$item.node_id}"{if $item_class} class="{$item_class|implode(" ")}"{/if}><div><a href={if eq( $ui_context, 'browse' )}{concat("content/browse/", $item.node_id)|ezurl}{else}{$item.data_map.location.content|ezurl}{/if} target="_blank"{if eq( $ui_context, 'edit' )} onclick="return false;"{/if}><span>{$item.name|wash()}</span></a></div></li>
{else}
<li id="node_id_{$item.node_id}"{if $item_class} class="{$item_class|implode(" ")}"{/if}><div><a href={if eq( $ui_context, 'browse' )}{concat("content/browse/", $item.node_id)|ezurl}{else}{$item.url_alias|ezurl}{/if}{if eq( $ui_context, 'edit' )} onclick="return false;"{/if}><span>{$item.name|wash()}</span></a></div></li>
{/if}
{/if}
{/foreach}
{/if}
{undef $root_node $top_menu_items $item_class $top_menu_items_count $current_node_in_path}
</ul>
<!-- Top menu content: END -->
</div>

great regards;

Guilherme Longo

Monday 08 October 2007 6:36:56 am

Is solved!!!!! ;o)

Was nescessary add this:

$top_menu_items=fetch( 'content', 'list', hash( 'parent_node_id', $root_node.node_id,
<b>'sort_by', $root_node.sort_array,</b>
class_filter_type', 'include',
'class_filter_array', ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ) ) )

Thanks!

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 31 2025 03:29:52
Script start
Timing: Jan 31 2025 03:29:52
Module start 'layout'
Timing: Jan 31 2025 03:29:52
Module start 'content'
Timing: Jan 31 2025 03:29:52
Module end 'content'
Timing: Jan 31 2025 03:29:52
Script end

Main resources:

Total runtime0.0233 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.3906151.2422
Module start 'layout' 0.00550.0043 739.6328220.7500
Module start 'content' 0.00980.0119 960.38281,001.8672
Module end 'content' 0.02170.0015 1,962.250037.9922
Script end 0.0232  2,000.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002611.2281140.0002
Check MTime0.00124.9617140.0001
Mysql Total
Database connection0.00072.956910.0007
Mysqli_queries0.003414.551930.0011
Looping result0.00000.082010.0000
Template Total0.00114.710.0011
Template load0.00093.687710.0009
Template processing0.00020.975710.0002
Override
Cache load0.00062.562310.0006
General
dbfile0.00125.305080.0002
String conversion0.00000.028740.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.0001 secs