Custom view and remove objects

Author Message

laurent le cadet

Tuesday 02 October 2007 5:22:56 am

Hi,

I have a custom view (/content/view/my_custom_view/123) for a node which has children listed with a remove checkbox.

If I hit remove, removeobject.tpl asks me to cancel or confirm.
In both action, the redirection is /content/view/full without the destination node_id which should be 123.

I don't understand the "redirection" mechanism for remove action.
Noway by adding a redirectUri to the form.

Any idea?

Laurent

André R.

Tuesday 02 October 2007 6:29:03 am

have you tested 'ViewMode'?
action.php:

else if ( $http->hasPostVariable( 'RemoveButton' ) )
{
    if ( $http->hasPostVariable( 'ViewMode' ) )
    {
        $viewMode = $http->postVariable( 'ViewMode' );
    }
....

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

laurent le cadet

Tuesday 02 October 2007 6:36:05 am

André,

How/where can I test that?
In the removeobject.tpl form?

Laurent

André R.

Tuesday 02 October 2007 7:17:10 am

No, the template calling content/action.

<input type="hidden" name="ViewMode" value="my_custom_view" />

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

laurent le cadet

Tuesday 02 October 2007 7:32:53 am

Perfect (Très très bien).

Laurent

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 20 2025 01:09:58
Script start
Timing: Jan 20 2025 01:09:58
Module start 'layout'
Timing: Jan 20 2025 01:09:58
Module start 'content'
Timing: Jan 20 2025 01:09:58
Module end 'content'
Timing: Jan 20 2025 01:09:58
Script end

Main resources:

Total runtime0.0116 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0043 590.2734152.6250
Module start 'layout' 0.00430.0019 742.898439.4609
Module start 'content' 0.00620.0038 782.359493.4453
Module end 'content' 0.01000.0015 875.804738.3047
Script end 0.0115  914.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002017.1589140.0001
Check MTime0.00098.0924140.0001
Mysql Total
Database connection0.00075.677710.0007
Mysqli_queries0.001815.970130.0006
Looping result0.00000.070210.0000
Template Total0.001210.510.0012
Template load0.00065.004910.0006
Template processing0.00065.479510.0006
Override
Cache load0.00043.496210.0004
General
dbfile0.00021.723380.0000
String conversion0.00000.057840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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