What it is
The CreateMenu extension allows you to add extra submission links to the global "Create" menu at the top of every page.
How to use it
The class should contain a single method, getItems(), which will return an array of entries for the create menu. The array key should be the language key used for the content item, and the value should be an array with the following keys:
- link: (required) This is the link that clicking the menu item entry will take you to
- title: (optional) This is the title of the dialog window if one is shown (see extraData)
-
extraData: (optional) This is an array of additional attributes to add to the link. Most commonly this is used to show a dialog window asking the end user where they want to submit the content item to (e.g. if submitting a new topic you must first choose which forum to submit into)
'extraData' => array( 'data-ipsDialog' => true, 'data-ipsDialog-size' => "narrow" ), - flashMessage: (optional) Flash message shown to the end user when they submit the dialog window. This is typically omitted, as most creation extensions send the user to a form to finish submitting the content.
You should verify the currently logged in user has permission to submit to your application before adding a link to the menu, and return an empty array() otherwise.
Report Document