0

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.

1 Answer 1

1

Start the Url with slash

<UrlAction Url="/_admin/target.aspx"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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