blueriver / MuraConfiguratorExample

A very simple example of a Mura plugin with a per instance display object configurator.
http://getmura.com
Apache License 2.0
4 stars 3 forks source link

unique id per instance #6

Closed guustnieuwenhuis closed 12 years ago

guustnieuwenhuis commented 12 years ago

Is there some unique id per instance of a display object?

I would need this since I'm saving input (provided in de display object) from the user in his/her session and I would like to do this per instance of the display object.

grantshepert commented 12 years ago

It depends upon what you are looking for. The ObjectID is a unique id for each registered display object. Adding a display object will generate a new ContentHistID/ObjectID record in tcontentobjects. This is essentially a unique combination, or alternatively you could also use ContentID/ObjectID. This should be enough to identify the display object instance that the input was generated from.

To have your own individual ID per instance (i.e. every time it is inserted onto a page), you could generate one in your own code via a configurator.

guustnieuwenhuis commented 12 years ago

Creating my own individual id in the configurator, what a simple idea and I didn't think of it... :)