Create new object and redirect

Author Message

Heiner Wurbs

Thursday 21 June 2007 7:40:49 am

Hi all !

I have a problem, because I want to display after content creation the newly created object in full view and not the line view of the newly created object with the full view of the parent object !

Have someone an idea?

I know this 2 possibilities, which doesn't suite:

<input type="hidden" name="RedirectURIAfterPublish" value={ezhttp('LastAccessesURI','session')} />
or 
<input type="hidden" name="RedirectURIAfterPublish" value={ezhttp('LastAccessedModifyingURI','session')} />

Thanks for your help !
Heiner

Kristof Coomans

Monday 25 June 2007 4:57:02 am

Hello Heiner

Take a look at this forum topic: http://ez.no/community/forum/developer/node_number_at_first_publishing

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

Heiner Wurbs

Tuesday 26 June 2007 4:24:14 am

thank you kristof for help, nice solution, should be part of eZ !

Thiago Campos Viana

Tuesday 26 June 2007 1:04:22 pm

I've used this code in the template of the content/edit:

{if eq($object.status, '0')}
<input type="hidden" name="RedirectURIAfterPublish" value={concat( "content/versionview/", $object.id,"/", $object.current_version )} />
{else}
<input type="hidden" name="RedirectURIAfterPublish" value={concat( "content/view/full/", $object.main_node_id )} />
{/if}

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

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 30 2025 19:45:37
Script start
Timing: Jan 30 2025 19:45:37
Module start 'layout'
Timing: Jan 30 2025 19:45:37
Module start 'content'
Timing: Jan 30 2025 19:45:38
Module end 'content'
Timing: Jan 30 2025 19:45:38
Script end

Main resources:

Total runtime1.4768 sec
Peak memory usage8,192.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.1328151.2109
Module start 'layout' 0.00550.0041 739.3438220.7031
Module start 'content' 0.00961.4664 960.04694,502.0000
Module end 'content' 1.47600.0008 5,462.046912.1641
Script end 1.4768  5,474.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2463160.0002
Check MTime0.00140.0934160.0001
Mysql Total
Database connection0.00070.045010.0007
Mysqli_queries1.382893.6381620.0223
Looping result0.00080.0549600.0000
Template Total1.377693.320.6888
Template load0.00240.164720.0012
Template processing1.375293.117820.6876
Template load and register function0.00180.119810.0018
states
state_id_array0.00730.491110.0073
state_identifier_array0.00400.268620.0020
Override
Cache load0.00200.1367240.0001
Sytem overhead
Fetch class attribute can translate value0.00160.110030.0005
Fetch class attribute name0.00190.129560.0003
XML
Image XML parsing0.00110.074030.0004
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00590.3974220.0003
String conversion0.00000.000540.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs