Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom action group deployed to central administration; something like "Contoso IT" in this picture:

http://www.picresize.com/images/rsz_ic583481.jpg

The problem is that that for some reason, the hyperlink for "Contoso IT" (the title) is different from the image hyperlink, although the same URL is specified in the XML. This means that if I click "Contoso IT", I'll be taken to the correct (valid) target page, but clicking on the picture next to it will lead me to a non-existent page due to wrong URL:

  • hyperlink for "Contoso IT" text is (as it should be) http://sp2010/_admin/target.aspx
  • hyperlink for the picture next to "Contoso IT" is incorrect: http://sp2010/_controltemplates/_admin/target.aspx - notice that for some reason, "_controltemplates" is added automatically.

XML of the action group:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">    
  <CustomActionGroup
    Id="customGroupId"
    Location="Microsoft.SharePoint.Administration.Default"
    Sequence="200"
    Title="Contoso IT"
    Description="..."
    ImageUrl="~/_layouts/images/CustomSymbol.png">
    <UrlAction Url="_admin/target.aspx"/>
  </CustomActionGroup>

  <CustomAction
  Id="customGroup_Link1"
  GroupId="customGroupId"
  Location="Microsoft.SharePoint.Administration.Default"
  Title="Privacy Policy"
  Description="...">
    <UrlAction Url="_admin/target.aspx"/>
  </CustomAction>  
</Elements>

How can I get both hyperlinks to point to the correct URL, http://sp2010/_admin/target.aspx without having to use absolute URLs? I can simply remove <UrlAction Url="_admin/target.aspx"/> from the CustomActionGroup element, but this will remove the hyperlink for both "Contoso IT" text as well as the image.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Start the Url with slash

<UrlAction Url="/_admin/target.aspx"/>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.