Forums / Setup & design / Publish article to multiple nodes? (#2)

Publish article to multiple nodes? (#2)

Author Message

Marko Žmak

Sunday 15 May 2005 6:24:27 am

This question was already asked on the forum, but what I got form the answers didn't work.

I'd like to publish an object to several nodes but using only one form. NOT by using "Add locations" button, but by selecting locations from a drop down menu in the form.

I tried to implement it by using the following form variables:

SetPlacementNodeIDArray[]
SetRemoteIDOrderMap[]
SetRemoteIDFieldMap[]

but id doesn't work. The object is published only to the first node specified by SetPlacementNodeIDArray[], the other nodes are just ignored.

Does anyone know the sollution to this problem?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Tuesday 17 May 2005 2:42:49 am

Does anyone have any answer to this problem?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Bruce Morrison

Monday 23 May 2005 4:14:01 pm

Hi Marko

I have used these form variables sucessfully in versions of ezPublish prior to the 3.5 series. However there seems to be some changes in how this is hanled in the 3.5 series. This is likely to be due to the fact that the node location functionallity has moved from the object editing screen.

After a quick look at the source code (hint hint :) it appears that the varaible useNodeAssigments must be set to 1 for these variables to be used (it is set to 0 by default).

The following variables must also be set or the placement will fail:
+ MainNodeID
+ SortOrderMap
+ SortFieldMap

The function to look at is storeNodeAssignments starting at line 226 of kernel/content/node_edit.php

At this point in time I have not tested this functionallity, only looked at the source.

Cheers
bruce

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

Marko Žmak

Monday 23 May 2005 4:19:16 pm

What is the purpose of this variables:

+ SortOrderMap
+ SortFieldMap

I saw them in edit_placement.tpl but it seems to me that they are used to browse for additional locations, not to set them.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Bruce Morrison

Tuesday 24 May 2005 4:24:38 pm

+ SortOrderMap
+ SortFieldMap

I believe they are used to set the ordering of the newly created node (how the children of the newly created node will be ordered).

Cheers
Bruce

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

kracker (the)

Tuesday 24 May 2005 11:23:24 pm

Ahh, Thank you Bruce!

Your explanation of the SortOrderMap and SortFieldMap make a lot of sense and clarify the last little bit I did not understand the first time around.

While I've not used this functionality yet, I believe in it and urge anyone else trying to use it to read the applicable kernel/ source code.

Perform some interactive debugging with tracer bullet output ( echo/print() )and breakpoints ( die() ) with all cache <b>disabled</b> to learn for yourself just how to successfully develop using this functionality.

//kracker
<i>Deftones : Knife Prty (Acoustic)</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Marko Žmak

Wednesday 25 May 2005 3:23:15 am

I'll probably try it in a week or two (don't have time right now). If I have success I'll reported here.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth