Forums / Setup & design / Creation context vs Edition context

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Creation context vs Edition context

Author Message

Hakim Bouras

Friday 14 December 2007 8:12:47 am

Hello,

I would like to use the same custom "user edit template" both for the creation and the edition of my users.

From within this "user edit template" how can I detect whether I am in an edition or creation context mode ?

I tried using <i>$object.current.main_parent_node_id</i>, but the problem is if there is a validation round trip (ie: the email entered was not correct) then <i>$object.current.main_parent_node_id</i> is set ...

(Maybe using the URL : user/register vs content/edit ... but how can I check the URL ? maybe there is a smarter way... )

Thank you for your help,
Hakim

Hakim Bouras

Monday 17 December 2007 2:29:45 am

The solution I found is checking <b>$object.current.status</b> which has a value of "5" ("EZ_VERSION_STATUS_INTERNAL_DRAFT") during the creation context as long as the new user is not really created (even during validation round-trip).