Category Archives: Iruzkin bat idatzi

Custom Action URL Will ez Film berriak erakutsi

I’m still in the habit of crafting my feature XML files by hand since it’s all quite new to me. I don’t want to rely on a front-end tool that does stuff I don’t understand (idatzi zuen blog-sarrera gisa, tresna bat da, ez du ulertzen erabiliz, esan zuen).

Gaur egun, I was trying to add a custom action to the site settings but it just wouldn’t show up. I could install the feature and see it in the site features, baina aktibatzen dut (error gabe) litzateke, besterik gabe, ez da agertuko goitibeherako menuan.

I finally realized that I misspelled "SharePoint" duen atributua Kokapena en <CustomAction> nodo. This is the bad elements.xml file:

<?xml bertsioa="1.0" kodeketa="utf-8" ?>
<Elementuak xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolbar"
 Groupid="SiteActions"
 Kokapena="Microsoft.Sharepoint.StandardMenu"
 Sekuentzia="100"
 Izenburua="Kaixo!"
 Deskribapena="Menu pertsonalizatuak ekintza ezaugarri baten bidez gehitu."
 ImageUrl="_layouts / irudi / menuprofile.gif">

    <UrlAction Url="http://www.xyzzy.com"/>

  </CustomAction>
</Elementuak>

Good:

<?xml bertsioa="1.0" kodeketa="utf-8" ?>
<Elementuak xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolBar"
 Groupid="SiteActions"
 Kokapena="Microsoft.SharePoint.StandardMenu"
 Sekuentzia="100"
 Izenburua="Kaixo!"
 Deskribapena="Menu pertsonalizatuak ekintza ezaugarri baten bidez gehitu."
    >
    <UrlAction Url="http://www.xyzzy.com"/>
  </CustomAction>
</Elementuak>

That one took me a good two hours to figure out 🙂

Kontsolamendu hartu dut, izan ere, dela egun batzuk etorkizunean, Egin ahal izango dute uste osoa esan dut, "back in the day, Hiru mila oinez muinoan gora elurra izan nuen (oinutsik!) in order to deploy a custom feature to MOSS. You kids, ez dakizu nola erraza izango duzu! Get off my lawn!"

Ezin da itxaron.

</amaiera>

Technorati Tags: ,