Plugin Environment Variable $this->containerId

Summary

The HTML/DOM id of the div element that your Plugin has been placed in.

Where You Can Use It

Can be used in methods called by plugins. From Zenario 7.0.0 onwards.

Description

If you need to give an element of your Plugin an id, you should make sure that this id will be unique. If you do not intend your Plugin to be used twice on the same page, prefixing the id with your Plugin's name may be sufficient.

However we recommend that you prefix the id with $containerId, which is generated from the current $slotName and will still be unique even if your Plugin is used twice.

If your Plugin is placed in a Nest, then your $this->instanceId and $this->slotName variables will be the same as every other Plugin in the nest, but your $this->containerId and $this->eggId variables will be different.