Forums / Developer / Node number at first publishing ?

Node number at first publishing ?

Author Message

Maxime Thomas

Tuesday 28 February 2006 1:00:26 am

Hi,

I would like to make a redirect after a publishing. The redirect must be on the content I've just created. In order to do that, I would like to use the RedirectURI hidden input but, I don't know what to put as value because I can't access to node number or url alias. This is a bit normal because the content I'm creating is not registred as a node in ezpublish.

My question is :

How can I redirect to the content I've juste created ?

Thanks.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Kristof Coomans

Tuesday 28 February 2006 2:51:40 am

I needed to accomplish this too, but didn't succeed by using existing functionality.

I made my own module which redirects to the main node of an object, by specifying the object id as a parameter in the URL. I've uploaded my extension to pubsvn, you can check it out from http://pubsvn.ez.no/community/trunk/extension/redirect.

Installation and use:

- enable the extension
- give your users access to the redirect module (assign them a role with a policy for function redirect of module redirect)
- you can use /redirect/mainnode/<i>yourobjectid</i> in the RedirectURIAfterPublish hidden input field.
- custom view parameters are passed by in the URL, so you can use /redirect/mainnode/<i>yourobjectid</i>/(customkey)/customvalue.

The extension was created in April 2005, and hasn't been tested on more recent releases of eZ publish. Feel free to try it, I hope it solves your problem.

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

Łukasz Serwatka

Tuesday 28 February 2006 3:19:29 am

Kristof did you think about making a package and put it into Contrib section? Probably more users will need something similar, and not all users browsing pubsvn, now it is a bit hidden.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Maxime Thomas

Tuesday 28 February 2006 3:48:45 am

Thank you.

I wonder why this is not an ezpublish settings as well as redirection after loggin. It could be nice to have :

<b>[RedirectSettings]</b>
RedirectMode=parent/content

I'm trying your extension.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Łukasz Serwatka

Tuesday 28 February 2006 3:57:53 am

You can read more about new redirection after user login feature in upcoming 3.8 here:

http://pubsvn.ez.no/websvn/filedetails.php?repname=nextgen&path=%2Ftrunk%2Fdoc%2Ffeatures%2F3.8%2Fadvanced_redirection_after_user_login.txt&rev=0&sc=1

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Kristof Coomans

Tuesday 28 February 2006 4:32:44 am

Hi Lukasz

Adding the extension to pubsvn was the quickest way to get it to Maxime. I will make a package and add it to the contributions at ez.no as soon as I have some more time. I know I should do this for all my extensions on pubsvn...

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

Maxime Thomas

Tuesday 28 February 2006 5:21:39 am

Ok.

The extension is working with ezpublish v 3.7.3

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Kristof Coomans

Monday 25 June 2007 4:56:58 am

Contribution page: http://ez.no/community/contribs/applications/redirect

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

James Ward

Friday 25 April 2008 9:16:28 am

Still works like a charm in ez 3.10. Thanks for the great contrib.

working at www.wardnet.com
blogging at www.jamesward.ca

andre müller

Sunday 18 May 2008 7:29:34 am

hmm, i don't understand all this..isn't this extension used to redirect to the main node of a not yet existing object? in that case, where do i get the object id from??
should i use the powercontent extension?

André R.

Sunday 28 September 2008 1:46:34 pm

Not yet published object (so it doesn't have a node id yet).
Typically used from edit templates if you want to redirect to the node after the user publishes the object, indirectly via this extension.

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

eZ debug

Timing: Jan 30 2025 19:51:00
Script start
Timing: Jan 30 2025 19:51:00
Module start 'content'
Timing: Jan 30 2025 19:51:00
Module end 'content'
Timing: Jan 30 2025 19:51:00
Script end

Main resources:

Total runtime0.3838 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0194 587.9297370.2969
Module start 'content' 0.01940.0244 958.22661,017.6563
Module end 'content' 0.04380.3399 1,975.88283,905.8359
Script end 0.3837  5,881.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00591.5468200.0003
Check MTime0.00200.5258200.0001
Mysql Total
Database connection0.00330.856010.0033
Mysqli_queries0.234661.12101410.0017
Looping result0.00180.47051390.0000
Template Total0.339588.510.3395
Template load0.00100.259810.0010
Template processing0.338588.197810.3385
Override
Cache load0.00070.175610.0007
Sytem overhead
Fetch class attribute can translate value0.00220.571210.0022
XML
Image XML parsing0.00030.089610.0003
General
dbfile0.02947.6638200.0015
String conversion0.00000.001630.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