Forums / Setup & design / parent_node_id - Where does it come from?

parent_node_id - Where does it come from?

Author Message

RW Wood

Monday 08 September 2003 7:34:42 am

As I'm learning to understand the templating system, I see that the menus on the demo site are generated by fetching content that has parent_node_id set to a number, ie 17 for the news site, 19 for the book corner, etc. However, I don't know how a template designer is supposed to know those numbers without going into the database and tracking them down. Is there some part of the admin database that I'm missing that would show these node numbers?

Additionally, I still don't get the idea of nodes as opposed to a folder structure with child folders and files, etc.

Thanks.
RWW

Bjørn Kaarstein

Monday 08 September 2003 7:49:36 am

You can find this out in the admin interface.

If you create an object (article, folder etc), then you'll have a link to your new object. In the status line you can see i.e. /content/view/full/19 where 19 will be your node number.

You can also get your nodenumber in the templates with {$node.node_id}

Ez has a tree structure, with node 2 as the top node.
Basically, every object can have children objects of different types.

Regards Bjørn

Alex Jones

Monday 08 September 2003 7:50:44 am

-- Looks like Bjørn beat me to hitting the 'Post' button. :) --

You don't have to go into the database. If you look at the content section of the admin area and click on one of the links such as "Book Corner" you will be taken to that node. If you look at the URL in your browser's address bar you will see a number at the end of it which is your node id. Every "page" or "folder" has its own node id; for example, the main node id for the root folder is most likely '2'.

I think of nodes as being far more flexible than a folder structure. Folders in and of themselves are rather useless in this system as any item can act as a container for children. So you can set up a press release that is a child of another press release if you wish. It can be both confusing and powerful. ;)

Hope this helps,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Hans Melis

Monday 08 September 2003 7:54:30 am

EDIT: I'm even slower ;)

You can see the node id's in the admin interface. Hover the mouse cursor over an object's name, and the url for that object will appear in the status bar. The node id is after /content/view/full/

However, when click the "Edit" picture, it won't show the node id in the address bar, but the object id.

Nodes serve as a container for objects. Each node has some attributes, and an object enclosed in it. In the most simple structure, you will indeed only have folders that create the structure. But with the node system, you can put anything anywhere in the content tree. With the folder system, you'd be restricted to placing content as a child of a folder.

You can simulate the folder system with the roles though. Content; Create; ParentClass(Folder) as permission should do the trick.

--
Hans

Hans
http://blog.hansmelis.be

eZ debug

Timing: Jan 18 2025 19:33:32
Script start
Timing: Jan 18 2025 19:33:32
Module start 'content'
Timing: Jan 18 2025 19:33:32
Module end 'content'
Timing: Jan 18 2025 19:33:33
Script end

Main resources:

Total runtime0.9915 sec
Peak memory usage4,096.0000 KB
Database Queries201

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 588.9609180.8281
Module start 'content' 0.00640.8553 769.7891627.0313
Module end 'content' 0.86170.1297 1,396.8203337.3672
Script end 0.9914  1,734.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4166210.0002
Check MTime0.00150.1536210.0001
Mysql Total
Database connection0.00090.090210.0009
Mysqli_queries0.919492.72252010.0046
Looping result0.00180.18641990.0000
Template Total0.963497.220.4817
Template load0.00180.182720.0009
Template processing0.961696.986120.4808
Template load and register function0.00020.017410.0002
states
state_id_array0.00100.100910.0010
state_identifier_array0.00080.083520.0004
Override
Cache load0.00150.1535300.0001
Sytem overhead
Fetch class attribute can translate value0.00140.138550.0003
Fetch class attribute name0.00100.105060.0002
XML
Image XML parsing0.00180.184550.0004
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00350.3578320.0001
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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs