Question: is it possible to get the container in which the menu was opened?
Question: is it possible to get the container in which the menu was opened?
The value of item is set to the item from which the menu was opened if it is an item menu, so this would make sense for containers too.
]]>« V14b7 beta (Previous Post)
< ![CDATA[
Yes, use “container”. This variable is only defined when the menu is not for an item, otherwise you can use “item.getParent()”
]]>
< ![CDATA[
Aha. thank you for the quick response. One more question: where is this information in the documentation?
]]>
< ![CDATA[
Long tap on the “Menu” settings, everything should be there, if it’s not I’ll fix it 😉
]]>
< ![CDATA[
It is indeed… How did I not see that xD
]]>