Forums / Setup & design / Node id organization does'nt work aft template code changed!

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!

eZ debug

Timing: Jan 18 2025 16:01:05
Script start
Timing: Jan 18 2025 16:01:05
Module start 'content'
Timing: Jan 18 2025 16:01:06
Module end 'content'
Timing: Jan 18 2025 16:01:06
Script end

Main resources:

Total runtime1.1411 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.0054 587.9688180.7969
Module start 'content' 0.00540.8228 768.7656577.7891
Module end 'content' 0.82820.3128 1,346.5547337.3672
Script end 1.1410  1,683.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3629210.0002
Check MTime0.00150.1333210.0001
Mysql Total
Database connection0.00070.062310.0007
Mysqli_queries1.047591.80182000.0052
Looping result0.00290.25521980.0000
Template Total1.107897.120.5539
Template load0.00350.309420.0018
Template processing1.104396.771620.5521
Template load and register function0.00020.018510.0002
states
state_id_array0.00100.085810.0010
state_identifier_array0.00320.278420.0016
Override
Cache load0.00310.2716700.0000
Sytem overhead
Fetch class attribute can translate value0.00320.279030.0011
Fetch class attribute name0.00130.109960.0002
XML
Image XML parsing0.00100.091730.0003
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00690.6010280.0002
String conversion0.00000.000330.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
1content/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: 24
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs