You can implement customactions in your own custom SharePoint page. This enables you to create your peage and afterwards,change or edit the links from within a feature.
Example:
A) In MyCustomPage.aspx
ID="GeneralLinks"
Location="MyApplication.Settings"
GroupId="MySettings"
/>
B) define in a feature this custom action:
GroupId="MySettings"
Location="MyApplication.Settings"
Sequence="1"
Title="My Item Settings"
Rights="ManageWeb">
C: Parsing {STRING}
As you can see there are 2 substrings that need to be parsed with the context. This is the place where OnAddLink enters the scene.
This is wat reflector told me:
public event EventHandler AddLink;
In other terms when we change our FeatureLink like this:
ID="GeneralLinks"
Location="MyApplication.Settings"
GroupId="MySettings"
OnAddLink="OnAddMySettingsLink" />
/>
and in the code behind we create our eventhandler:
protected void OnAddGeneralLink(Object sender, AddLinkEventArgs e)
{
e.Link.NavigateUrl =
e.Link.NavigateUrl.Replace("{MYITEMID}", m_id);
e.Link.NavigateUrl =
e.Link.NavigateUrl.Replace("{LISTID}", m_listID);
}
e.link returns a hyperlink webcontrol object that you can manipulate as you like.
VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]