MOSS 2007: Создаем Feature за 5 минут
???????????, feature's - ??? ?? ?????? ???????? ??????????????????? ????, ? ? sharepoint ???????? ???? ?????????? ?????????? ???????? ??????????? ? ?????????.
Sharepoint ?????? ???? features ? ????? C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES
????, ????????? ??????? ??????????? ????, ??????? ??????? ????? ????? ? ???? Site Actions.
???? ? ????? C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES ? ??????? ??? ????? ?????, ???????? MyTestFeature
? ??? ??????? ????? xml ???? feature.xml (?????????? ?? ?????? ?????? ???)
????????? feature.xml ? Visual Studio 2005. ??? ????, ????? ? ??? ????????? IntelliSence ??? ????? ??????? ????? ??? ?????? xml ?????. ? ?????????, ??? ????? ??? ??? ?????: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\wss.xsd
????? ?? feature.xml ????????? ???:
<?xml version="1.0" encoding="utf-8"?>
<Feature xmlns="https://schemas.microsoft.com/sharepoint/"
Id="<???? ???????? GUID>"
Title="Test Feature"
Description="My feature example description"
Scope="Site"
Hidden="FALSE"
>
<ElementManifests>
<ElementManifest Location="SiteActions.xml" />
</ElementManifests>
</Feature>?????? ???? ????? ???? ?????????? ?????????????. ??? ?? ????? ????????????? ????? ?? VS2005, ??? ????? ? ???? ??????? ????? Tools -> Create GUID. ??????????????? GUID ??????? ? Id
??????? ??? ???? xml ???? ? ????????? SiteActions.xml
????? ???? ????????? ???:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="https://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="SiteActionsToolbar"
GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="User Guide"
Description="Test menu" >
<UrlAction Url="Help.aspx" />
</CustomAction>
</Elements>??????? Help.aspx ???????? ?????????? ?????????? ? ?????? ??? ? ?????? ?????? ?????.
<%@ Page Language="C#" MasterPageFile="~masterurl\default.master" %>
<asp:Content ContentPlaceHolderID="PlaceHolderMain" runat=server>
<h1>Funny user manual!</h1>
</asp:Content>????? ???? ?????? ????????, ?? ???? ????????????????? ? ????????????. ????????? ????????? ?????? ? ?????? ?????????:
cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Bin
stsadm.exe -o installfeature -name MyTestFeature
????? ?????? iisreset????????? ??? SharePoint ????, ???????? ? Site Actions Site Settings > Site Features. ???? ???? ???? ? ?????????? ??. ????? ????? ?? ???? ????????? ?????? ????? ???????? ????? ????? ? ???? Site Actions, ??????? ?????????? "User Guide"
?????? ?? ????: