Custom Actions in the Ribbon
I wanted to make an additional group in de Publish-tab of my page. This blog helped me determine where this tab was located.
STEP 1: Empty Elements.xml
Create a new empty element in your SharePoint application.
Here I chose to make the actions only available for the ones who have enough rights to add, edit and delete webpages and webparts.
STEP 2: Template Layout
I want my buttons my custom group to be large and viewed in one row.
STEP 3: Create custom group in existing tab
STEP 4: Add JavaScript
Make an extra Custom Action to link to a extended JavaScript-file.
STEP 5: SPContext.Current.ListItem
I want to use the current ListId and the current ItemId in my JavaScript method.
For this I use SP.PageContextInfo.get_pageListId() and SP.PageContextInfo.get_pageItemId().
IMPORTANT: Changes in elements.xml after deployment of feature
If you made changes after you deployed your ribbon buttons, you will not see the changes take place.
For some bizarre reason SharePoint doesn’t recognizes the changes until you change the version of your feature.
STEP 1: Empty Elements.xml
Create a new empty element in your SharePoint application.
Here I chose to make the actions only available for the ones who have enough rights to add, edit and delete webpages and webparts.
STEP 2: Template Layout
I want my buttons my custom group to be large and viewed in one row.
STEP 3: Create custom group in existing tab
STEP 4: Add JavaScript
Make an extra Custom Action to link to a extended JavaScript-file.
STEP 5: SPContext.Current.ListItem
I want to use the current ListId and the current ItemId in my JavaScript method.
For this I use SP.PageContextInfo.get_pageListId() and SP.PageContextInfo.get_pageItemId().
IMPORTANT: Changes in elements.xml after deployment of feature
If you made changes after you deployed your ribbon buttons, you will not see the changes take place.
For some bizarre reason SharePoint doesn’t recognizes the changes until you change the version of your feature.
Reacties
Een reactie posten