Forums / Setup & design / detect "parent" object in embeded object template

"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".

detect "parent" object in embeded object template

Author Message

Marko Žmak

Thursday 28 January 2010 4:11:54 am

I have an object (object A) embeded in OE field of another object (object B), and I have a template override for this embeded object A. How can I detect in this template what is the the object_id of the object B?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Bertrand Dunogier

Thursday 28 January 2010 7:25:22 am

You can get a variable from the parent's template namespace using the # sign. If the variable you're looking for is $object_id, this is what it would look like:

$#object_id

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier