Forums / Developer / Content object node / node assignment?

Content object node / node assignment?

Author Message

Marin Orlic

Thursday 15 December 2005 1:26:38 pm

Can someone explain the meaning of node assignment? I understand the logic of contentobjects and there corresponding node(s), but what's with the node assignments??

Thx.

Bertrand Dunogier

Wednesday 21 December 2005 10:40:47 am

A node assignment is just an entry in the ezcontentobjecttreenode table. It says that node X references object Y. One node references one object, and an object can be referenced by 0 to N nodes.

Marin Orlic

Thursday 22 December 2005 1:39:30 am

Ok, you're talking about ezcontentobject_tree table.. what's eznode_assignment? Does the first handle versions and the second current tree?

Norman Leutner

Friday 23 December 2005 12:25:53 am

As Bertrand already told,

an object can be assingned to N nodes.
The relation between object and node is called "node assignment".

With that relation you can build content trees without redundant data.

In example:
You build a site and want to have the same content on two sites.
Just assign the object to another node.

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Marin Orlic

Wednesday 28 December 2005 2:07:37 pm

How are nodes created?

Is this right:
When an object is first posted, its main node is created with node assignment, and then later, if it is published to additional locations, new assignments are created.

What happens if the main node needs to be changed? Is just the assignment modified or? How to delete main node (in PHP ? :)

Thanks for your answers :)

Norman Leutner

Thursday 29 December 2005 7:55:29 am

Yes It is right.
When you create a contentpage within ez,
a node with a the related contentobject is created.

When you add a second location, another node is created.

Every node and object has an attribute called "main_node_id" which contains the assigned main node .

I hope this helps

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Marin Orlic

Monday 02 January 2006 3:31:22 pm

Wait wait.. if the second node is create when another location is added, what's the purpose of node assignments? Sounds to me that in this case it would be a 1:1 relationship, not 1:N.. Or are nodes used to store additional version info?

Kristof Coomans

Tuesday 03 January 2006 12:59:25 am

When you edit an object, you can add additional node assignments for it (in the old admin interface, eZ publish before the 3.5 release). When adding such a node assignment, the eznode_assignment table is used to store the assignment information for the specific version of the object. These assignments are not present in the content tree until the version gets published. The actual tree is represented by the ezcontentobject_tree table.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Xavier Dutoit

Tuesday 03 January 2006 4:47:50 am

You can still assign the nodes while editing after 3.5.

however you haveto customise your edit.tpl to add a few fields:

UseNodeAssigments=1
and set MainNodeID to whatever you want

You can (have to ?) assign to several placements using other variables. I've used it for a website and works well. I don't have the details right now...

X+

http://www.sydesy.com

eZ debug

Timing: Jan 18 2025 11:00:28
Script start
Timing: Jan 18 2025 11:00:28
Module start 'content'
Timing: Jan 18 2025 11:00:28
Module end 'content'
Timing: Jan 18 2025 11:00:28
Script end

Main resources:

Total runtime0.1822 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.0076 587.7344180.8281
Module start 'content' 0.00760.0070 768.5625101.8828
Module end 'content' 0.01460.1675 870.4453529.8281
Script end 0.1821  1,400.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00382.0861200.0002
Check MTime0.00150.8054200.0001
Mysql Total
Database connection0.00080.417110.0008
Mysqli_queries0.133173.05391410.0009
Looping result0.00150.81571390.0000
Template Total0.167291.810.1672
Template load0.00090.492810.0009
Template processing0.166391.286410.1663
Override
Cache load0.00070.363410.0007
Sytem overhead
Fetch class attribute can translate value0.00110.614110.0011
XML
Image XML parsing0.00020.131210.0002
General
dbfile0.00452.4564200.0002
String conversion0.00000.003430.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.0001 secs