How do I change object's location?

Author Message

Aleksandar Adam

Tuesday 27 March 2007 1:24:27 am

Hello,

I would like to know how to change object location i structure tree; in the ohter words:

I would like to move <b>object X</b> from <b>folder A</b> to <b>folder B</b>

and that should be done in the template, not from the admin interface as guys below thougt.

In the other words I would like to do it programatically. When I click a button on my webpage the object moves from one folder to another.

Thanks in advance
Aleksandar

Sylvain Bannier

Tuesday 27 March 2007 4:49:55 am

Hello,

By object, you probably mean "content node" ?

http://www.smile.fr

Softriva .com

Tuesday 27 March 2007 9:40:07 pm

Click on Folder A
Scroll down to see a list of all items in Forlder A

Then you will see three icons to right of each item which are

Edit (Pencil Icon)
Move to another loc (arrow pointed to a folder)
make another copy of the same item (doc)

Click on Move to another loc Then it easy from there

If you don't see the three icons make sure you click on detailed on the top of the list.

I hope I did not confuse you.

Aleksandar Adam

Tuesday 27 March 2007 11:57:32 pm

This was missunderstadning, sorry I wrote wrong,

I would like to move object X from one folder A to folder B which I would control by the template code.

Or in the other words to have template which has abitility to move objects in structure tree programatically - for example I click a button on my webpage and then object X goes from folder A to folder B.

How do I proceed?

Sylvain Bannier

Wednesday 28 March 2007 2:46:15 am

Hello,

You're not supposed to do such a task in template code. This kind of action should be performed in modules or cron jobs.

The following code should open the browser to move the node 12345 :

<form action={'/content/action'|ezurl} method="post">
<input type="hidden" value="12345" name="ContentNodeID"/>
<input class="button" type="submit" value="Move" name="MoveNodeButton"/>
</form>

@see http://ez.no/download/ez_publish/changelogs/ez_publish_3_5/add_move_operation_for_nodes_in_navigation_mode

http://www.smile.fr

Aleksandar Adam

Wednesday 28 March 2007 10:33:08 am

Thanks for your answer. :=)

There two more questions:

1. If you know if there is some simple piece (understandable for beginner) of php code which moves an object from one folder to another?

2. some good reading about: modules, cronjobs and workflows. (best with some practical examples)

best regards
Aleksandar

Kristof Coomans

Wednesday 28 March 2007 11:16:13 am

Hi Aleksander

1) http://ezpedia.org/wiki/en/ez/moving_a_node

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

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 18 2025 11:22:50
Script start
Timing: Jan 18 2025 11:22:50
Module start 'layout'
Timing: Jan 18 2025 11:22:50
Module start 'content'
Timing: Jan 18 2025 11:22:52
Module end 'content'
Timing: Jan 18 2025 11:22:52
Script end

Main resources:

Total runtime1.3024 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.9375152.6250
Module start 'layout' 0.00640.0032 740.562539.4453
Module start 'content' 0.00951.2915 780.0078665.0078
Module end 'content' 1.30110.0013 1,445.015616.1563
Script end 1.3024  1,461.1719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2457160.0002
Check MTime0.00130.0981160.0001
Mysql Total
Database connection0.00060.048410.0006
Mysqli_queries1.222493.8573730.0167
Looping result0.00080.0643710.0000
Template Total1.261596.920.6308
Template load0.00200.155520.0010
Template processing1.259596.704320.6297
Template load and register function0.00010.009310.0001
states
state_id_array0.00140.109610.0014
state_identifier_array0.00270.209220.0014
Override
Cache load0.00180.1394500.0000
Sytem overhead
Fetch class attribute can translate value0.00070.053640.0002
Fetch class attribute name0.00200.1515100.0002
XML
Image XML parsing0.00600.459040.0015
class_abstraction
Instantiating content class attribute0.00000.0020130.0000
General
dbfile0.00470.3637270.0002
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs