|
|||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
IntroductionFor use in Microsoft Office SharePoint Server (MOSS) 2007, this Web part displays the site structure in a hierarchical tree that is expandable and collapsible. It is based on my Site Map custom control written for Content Management Server 2002. DescriptionThe Web part uses a It has several public properties:
The Web part uses two methods to include resources. Images are treated as Class Resources and JavaScript files are treated as Embedded Resources. To package images as Class Resources in a Solution, include them in Manifest.xml, like: <?xml version="1.0" encoding="utf-8" ?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/"
SolutionId="SolutionGuid" ResetWebServer="TRUE">
<Assemblies>
<Assembly Location="QuestechSystems.SharePoint.Publishing.dll"
DeploymentTarget="GlobalAssemblyCache">
<ClassResources>
<ClassResource Location="images\node-closed.gif" />
<ClassResource Location="images\node-open.gif" />
<ClassResource Location="images\node.gif" />
</ClassResources>
<SafeControls>
<SafeControl Assembly="QuestechSystems.SharePoint.Publishing,
Version=1.0.0.0,
Culture=neutral, PublicKeyToken=AssemblyToken"
Namespace=
"QuestechSystems.SharePoint.Publishing.
WebControls.WebParts"
TypeName="*" Safe="True" />
</SafeControls>
</Assembly>
</Assemblies>
<FeatureManifests>
<FeatureManifest Location="QuestechPublishingWebParts\Feature.xml" />
</FeatureManifests>
</Solution>
In Solution deployment, resource files are deployed based on the assembly destination. For assemblies deployed to the bin directory, resource files are copied to an assembly subdirectory under the wpresources directory of the destination IIS Web application. For assemblies deployed to GAC, resource files are copied to an assembly subdirectory under virtual directory _wpresources. In the code, a path to resource files is obtained from For the JavaScript file SiteMap.js, set its build action to "Embedded Resource" in Visual Studio 2005. In code, reference the file using [assembly: System.Web.UI.WebResource
("QuestechSystems.SharePoint.Publishing.WebControls.
WebParts.SiteMap.SiteMap.js", "text/javascript")]
The Web part also uses a resource file to store all messages and property attribute UI strings. It demonstrates how to develop a custom class that inherits InstallationThe sample Visual Studio 2005 solution includes all the support files you need to build and deploy this Web part, minus strong name key files (*.snk). It contains three projects: Deployment, Features and SharePoint.Publishing. The SharePoint.Publishing project contains source codes for the Web part. The Features project contains all the features to support the SharePoint.Publishing project. The Deployment project contains a pre-build script to aggregate all the files needed for deployment. It contains a Solution directory where a WSP file is generated and deployed by a post-build script. This structure of Visual Studio solution and projects is scalable to full blown MOSS/WSS development and deployment. You could add additional projects like SharePoint for WSS or MOSS non-publishing development or SharePoint.ApplicationPages for customization of administrative layout pages. Within your projects, you could have other custom components like user and Web controls, custom fields, feature receivers etc. Of course you can install the Web part as is without further customization. Using stsadm -o addsolution -filename QuestechSolution.wsp
Then go to SharePoint Central Administration/Operations/Global Configuration-Solution Management and deploy the solution to selected Web applications. In the site collection where the solution is deployed, activate the feature "Questech Systems Publishing Web Parts". After that, the Site Map Web Part should be available for you to add to pages. References
History
|
||||||||||||||||||||||||||||||