For
example let’s say we want to update the titles for rest of the alternative
language sites after changing the title of one of the webs. We can simply have a
custom action in the site settings screen.
We
can implement the action as clicking on this link will redirect the user to a
_Layouts page where we have our custom code implemented to perform the required
task.
This
custom action can be created using an empty SharePoint element deployed by a
feature.
Below
is the elements.xml file for the Element. Here “GroupId”
specifies the group in site settings page where the link should appear. Here is
a list of the default custom action group IDs in MSDN.
It is also possible to add a custom group in the site settings page. Here is
the CustomActionGroup Element definition in MSDN.
“UrlAction Url” specifies
the _layouts page consisting of our custom code, while “Rights” specifies the
set of rights that the user must have for the link to be visible. If this
optional property is not specified, the action always appears in the list of
actions.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="TitleAlternateLanguages"
GroupId="Customization"
Location="Microsoft.SharePoint.SiteSettings"
Title="Title
- Alternate Languages"
Rights="ManageWeb"
Sequence="41">
<UrlAction Url="_layouts/AlternativeLanguages/prjaltlansetng.aspx"/>
</CustomAction>
</Elements>
More
information on CustomAction Element in MSDN is here.
1 comment:
You can create a visual studio solution which uses CustomAction for such requirements.
Here is the step by step instructions to build a visual studio solution which adds new custom link in site settings page: Add a Link to Site Settings Page in SharePoint.
Post a Comment