Kuv tseem nyob tus cwj pwm uas crafting kuv feature XML ntaub ntawv yog xuas tes ntxuav vim nws tseem tshiab heev tas rau kuv. Kuv tsis xav cia ib tug front-end uas ntawd puas khoom kuv tsis to taub (Nws hais tias nws tau sau ib tug tuaj txog blog uas siv ib tug uas nws tsis to taub).
Hnub no, Kuv twb sim ntxiv ib txog kev cai los ntawm tej chaw kawm ntawv, tiam sis nws cia li tsis tshwm. Kuv yuav nruab ib lub feature thiab pom nyob rau hauv lub qhov nta, tiam sis thaum kuv tshuab txais (tsis muaj kev ua yuam kev) nws tsuas tsis tshwm rau ntawm daim ntawv qhia zaub mov nco-down.
Pom tau kuv thaum kawg hais tias kuv misspelled "SharePoint" nyob rau hauv attribute qhov chaw nyob ntawm tus <CustomAction> ntawm. Qhov no nws yog ntawv phem elements.xml:
<?xml Version="1.0" encoding="utf-8" ?> <Ntsiab xmlns="http://schemas.Microsoft.com/sharepoint/"> <CustomAction Tus ID="SiteActionsToolbar" GroupId="SiteActions" Qhov chaw="Microsoft.Sharepoint.StandardMenu" Ib theem zuj zus="100" Npe="Nyob zoo!" Hauj lwm lawm="Tshuab raj ua kev cai txiav txim ntxiv ntawm ib feature." ImageUrl="_layouts/images/menuprofile.gif"> <UrlAction Url="http://www.xyzzy.com"/> </CustomAction> </Ntsiab> |
Zoo:
<?xml Version="1.0" encoding="utf-8" ?> <Ntsiab xmlns="http://schemas.Microsoft.com/sharepoint/"> <CustomAction Tus ID="SiteActionsToolBar" GroupId="SiteActions" Qhov chaw="Microsoft.SharePoint.StandardMenu" Ib theem zuj zus="100" Npe="Nyob zoo!" Hauj lwm lawm="Tshuab raj ua kev cai txiav txim ntxiv ntawm ib feature." > <UrlAction Url="http://www.xyzzy.com"/> </CustomAction> </Ntsiab> |
That one took me a good two hours to figure out 🙂
Kuv yuav tsum solace nyob txog tias ib hnub yav tom ntej, Kuv yuav tau mus hais rau lub txim ua txhaum, "rov qab rau lub hnub, Kuv yuav tsum tau taug kev mais peb nce toj hauv cov daus (barefoot!) thiaj li deploy rau ib tug kev cai feature rau NTXHUAB. Koj cov me nyuam, koj tsis paub li cas easy koj muaj nws! • Get off kuv nyom!"
Yuav tos tsis tau.
</kawg>