Posts Tagged ‘Sharepoint Server’

MOSS21 / Things to remember for webpart development.

Saturday, January 10th, 2009

This article will help you to develop webpart quickly and easily. Remember following things during the werpart development. That will speed up the creation and deployment of the webpart.

Things to remember when creating and deploying webpart to the site:

  • Give Assembly name and namespace name for that right click on the project name in solution explorer and select properties. On Application tab give assembly name and namespace name.
  • On Build tab in output path give the bin directory path of the site on which you want to deploy the web part.
  • Open AssemblyInfo.cs file and add system.security namespace and also add [assembly: AllowPartiallyTrustedCallers()] and then save the file.

MOSS Webpart

  • Open the web.config file of the site on which you have to deploy the web part. Site bin directory is under the vitual directories. Path is C:\Inetpub\wwwroot\wss\VirtualDirectories.
  • In web.config file add safecontrol entry under safe controls section.

MOSS Webpart

  • Also Change the trust level: and change it to Full (Write Full trust level).

MOSS Webpart

  • Deploy the web part.
  • When you deploy the web part the dll of the web part that you have created had been created in the bin directory of that site folder under virtual directories.
  • On the site go to the web parts section. Click on the site settings menu under site action dropdown list and select web part click new tab and select the web part check mark the web part that you have deployed. And click on populate gallery button now you can add a web part on the web part zone.

MOSS Webpart

MOSS Webpart

  • Now you can add the web part on the web part zone.

MOSS11 / Creating a Solution for SharePoint Server

Wednesday, September 10th, 2008

SharePoint team and Project server team at offshoresoftwaredevelopmentindia.com has great experience of creating web application based on MOSS 2007 and Project server 2007. That includes customization and development of webpart, site definitions, theme development, extension development, module creation. The team has developed CRM application, Job portal, Project management, to CMS applications based on MOSS 2007 and project server 2007.

Team would like to share same experience. This can help who wanted to begin with the sharePoint development and Project Server development.

There are list of articles start with SP and from number 1 to … Always start with the article SP1 and read next article to start working on MOSS easily and quickly.

Creating a Solution:

A solution package is a cabinet (.cab) file with a .wsp file name extension and a manifest file. It can contain the following components:

  • Site definitions
  • Feature definitions and their corresponding element definitions and files
  • Web Part files (*.webpart, *.dwp)
  • Template files and root files, which can include the following:
    1. _layouts files
    2. Resources(*.resx)
    3. Resource files(for example, *.doc or *.xls)
  • Assemblies, which can include the following:
    1. Safe control entries
    2. Resources
  • Code access security policies

Solution files have a hierarchical structure a manifest file is at the root while feature, resource, or site definition directories are contained in subdirectories. In turn, feature definitions define where associated files are located inside of the solution.

The solution creator can define the remaining structure; however, it is recommended that files for a particular feature or site definition be placed in that feature or site definition’s subdirectory.

Note:

The directory structure inside of the .wsp file determines the final directory structure on the front-end Web server file system.

To create a solution package, perform the following steps:

  • Create a solution manifest.xml file.
  • The solution manifest (always called manifest.xml) is stored at the root of a solution file. This file defines the list of features, site definitions, resource files, Web Part files, and assemblies to process. It does not define the file structure if files are included in a solution but not listed in the manifest XML file, they are not processed in any way.

    Following is the structure of a manifest.xml file.

    XML

<Solution SolutionId=”4AFC1350-F354-4439-B941-51377E845F2B” xmlns=”http://schemas.microsoft.com/sharepoint/”>

<FeatureManifests>
<FeatureManifest Location=”FeatureLibrary\feature.xml”/>
</FeatureManifests>
<TemplateFiles>
<TemplateFile Location=”ControlTemplates\Featurelibraryform.ascx”/>
</TemplateFiles>
<RootFiles>
<!– These files go into the 12\ directory and can be used for Web services and global resources –>
<RootFile Location=”ISAPI\MyWebService.asmx”>
</RootFiles>
<Assemblies>
<Assembly DeploymentTarget=”GlobalAssemblyCache”
Location=”ms.samples.sharepoint.myFeature.dll”/>
</Assemblies>

</Solution>

In addition, you can add a DwpFiles element to specify .webpart or .dwp files, or a ResourceFiles element to specify resource files, site definitions, application resources, and code access security policies.

  • Optional. Annotate your feature.xml files with tags.

In the <ElementManifests> tag in your feature.xml file, add <ElementFile Location=”…”/> for all of the extra files in your feature, such as .aspx pages (for example, allitems.aspx) or master pages, and so on.

Note:

This step is required only if your solution contains features.

  • Create your solution package (the .wsp file).

Because the solution file is essentially a .cab file, use the makecab.exe tool to create the solution package. The makecab.exe tool takes a pointer to a .ddf file, which describes the structure of the .cab file. The format of a .ddf file is basically in the same style as the .inf file you declare a standard header and then enumerate, one file per line, the set of files by where they live on disk, separated by where they should live in the .cab file.

Xml

.OPTION EXPLICIT; Generate errors
.Set CabinetNameTemplate=MySolutionFile.wsp
.set DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory
.Set CompressionType=MSZIP;** All files are compressed in cabinet files
.Set UniqueFiles=”ON”
.Set Cabinet=on
.Set DiskDirectory1=Package
build\manifest.xml manifest.xml
build\ MySolutionFile \feature.xml MySolutionFile \feature.xml

Installation Instructions:

Prerequisites:

- Installation package: LHH.PageLayoutsAndLists.wsp

- Flash Player installed on the client to access the site.

From cmd go to: “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin”

  • Adding Solution:

Run this command:
Stsadm.exe -o addsolution -filename C:\Temp\LHH.PageLayoutsAndLists.wsp

  • Deploying Solution:

Run this command
Stsadm.exe -o deploysolution -name LHH.PageLayoutsAndLists.wsp –local -allowgacdeployment

  • Activating Features:

From LHH Portal Site go to Site Actions >> Site Settings >> Modify All Site Settings

Site Collection Features
Activate:
LHH Content Types
LHH Master Page and Page Layouts

  • Referencing content types:

Go to “Site Actions” >> View All Site Content >> Pages
Click on “Document Library Settings”
Click on Advance Settings >> Allow Manage Content Types (True) >> Ok

Then Go to

Site actions -> Site setting -> modify all settings

Site collection administration -> site collection feature

solution site settings

Then you will see the site collection feature list, active our feature from the list. We will have all the features available.

solution site features

MOSS10 / Publishing Page Layout using a Feature

Sunday, August 10th, 2008

SharePoint team and Project server team at offshoresoftwaredevelopmentindia.com has great experience of creating web application based on MOSS 2007 and Project server 2007. That includes customization and development of webpart, site definitions, theme development, extension development, module creation. The team has developed CRM application, Job portal, Project management, to CMS applications based on MOSS 2007 and project server 2007.

Team would like to share same experience. This can help who wanted to begin with the sharePoint development and Project Server development.

There are list of articles start with SP and from number 1 to …. Always start with the article SP1 and read next article to start working on MOSS easily and quickly.

Publishing Page Layout using a Feature:

This is the post on creating site columns, publishing content types and page layouts using features:

This post describes how to create a publishing page layout and deploy it using a custom feature. Now that we have a custom publishing site columns as well as custom publishing content types defined using a feature, the next step is to create the page layout.

Publishing page layouts map to the custom fields of a publishing content type. The files are placed in the Master page gallery (Site Actions > Site Settings > Modify All Settings > Galleries section > Master pages and page layouts).

Creating the page layout:

The page layout can be created by using Visual Studio 2005. It’s really an .ASPX page and some basic Intellisense works for the SharePointWebControls and PublishingWebControls.

If you need information on how to create your custom page layout there is a very good article on MSDN:

Customizing and Branding Web Content Management-Enabled SharePoint Sites (Part 1 of 3): Understanding Web Content Management and the Default Features.

Important to remember here is that you are dependant from the Master Page that will be used together with your page layout. In this article I’m using the default Blue Bland one; so all the default Content placeholders are available.

Snippet of the page layout (download all the files from the link at the bottom of the post):

Publishing Page layout Usinf Feature

Tip: to quickly create and test a page layout for my custom content types I sometimes use SharePoint Designer 2007 (SDP). Create the page layout by choosing “New > Page Layout” in the Master pages gallery. Be sure to choose your custom page layout:

Publishing New PageLayout

Then open the page using SharePoint Designer. Add your HTML and design elements and drag your custom properties to the page. HTML page design is really not my thing so this is an easy way to add some tables and layout to the page. Once you have the page ready in SPD, save the file, check in and test it by creating a new page.

You can now use the HTML and controls from this page when creating your custom page layout using Visual Studio.

Note that SPD saves the page directly into the SharePoint database and not on the hard drive. So this is just a fast way to start up the creation of your page layout but it does not allow you to deploy the page easily to other servers.

Creating the provisioning xml schema:

To provision the page layout and any used CSS, images or other files we create a XML file that will be picked up by the feature and install the files in the corresponding libraries in your publishing site.

In my example I have one custom page layout with just one image. I could as well have several images and CSS files installed using the same feature. I guess you get the idea with this image sample.

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>

<Module Name=”ProductPageLayouts” Url=”_catalogs/masterpage” Path=”PageLayouts” RootWebOnly=”TRUE”>

<File Url=”ProductDetail.aspx” Type=”GhostableInLibrary”>
<Property Name=”Title” Value=”$Resources:pagelayout_product_name;” />
<Property Name=”MasterPageDescription” Value=”$Resources:pagelayout_product_description;” />
<Property Name=”ContentType” Value=”$Resources:cmscore,contenttype_pagelayout_name;” />
<Property Name=”PublishingPreviewImage” Value=”~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/DefaultPageLayout.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/DefaultPageLayout.png” />
<Property Name=”PublishingAssociatedContentType” Value=”;#$Resources:contenttype_productbase_name;;
#0×010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB0645
84E219954237AF3900ADB88465BE2C439798977662094183BC;#”/>
</File>

</Module>
<Module Name=”ProductLayoutImages” Url=”Style Library” Path=”Styles” RootWebOnly=”TRUE”>
<File Url=”images/line.jpg” Name=”product/images/line.jpg” Type=”GhostableInLibrary” />
</Module>

</Elements>

(Note: the value for PublishingAssociatedContentType above contains a break for HTML display reasons. You should put the value in one line).

I must say not much is available in the MSDN documentation about the schema for provisioning publishing pages. Like in other cases I looked at the PublishingLayouts feature delivered with the MOSS 2007 installation. This is a hidden feature that provisions the standard page layouts, master pages, etc for a MOSS Publishing site. You can find the feature here: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\PublishingLayouts.

Some clarifications to the schema elements:

<Module> element:

<Module Name=”[your module name]” Url=”virtual path destination of the module elements ” Path=”path from within this feature”>

PublishingAssociatedContentType property:

This property specifies to which the page layout you are installing is mapped to. The syntax is
;#ContentTypeName;#ContentTypeID;#

GhostableInLibrary:

Every element has the property Type=”GhostableInLibrary”. This property is important because it will install the file in the Master Page gallery, but the actual file content are still stored on the hard drive and not directly in the SharePoint database (as is the case if you create your page layout using SDP).

Wrapping it up: creating the feature:

I’m using one single feature to create my custom publishing fields, custom publishing content type and custom page layout(s).

The feature now has the following structure:

Three XML files are referenced by the feature schema in the order in which they should be installed.

  • myfields.xml: this file defines all my custom site columns.
  • ProductContentTypes.xml: this file defines my two custom publishing content types and uses the custom field defined in myfields.xml.
  • PageProvisionedFiles.xml: this file contains the provisioning for page layout and associated image.

I think the order in which these files are referenced in the feature schema are important because the site columns must be created before the content types, and the content types must be created before the page layout can reference it.

So, I have no proof that this really executes in the order defined in the feature schema but I do assume it is the case. Maybe someone has found some documentation on this?

Feature schema:

<?xml version=”1.0″ encoding=”utf-8″?>
<Feature Id=”787DCDC4-97F9-4f64-A771-D2A8B86DCADB”
Title=”My publishing content type”
Description=”$Resources:feature_description;”
Version=”1.0.0.0″
Scope=”Site”
DefaultResourceFile=”_Res”
Hidden=”FALSE”
xmlns=”http://schemas.microsoft.com/sharepoint/”>
<ActivationDependencies>
<!– Add a dependency to the Publishing site–>
<ActivationDependency FeatureId=”F6924D36-2FA8-4f0b-B16D-06B7250180FA” />
</ActivationDependencies>
<ElementManifests>
<ElementManifest Location=”myfields.xml”/>
<ElementManifest Location=”ProductContentTypes.xml”/>
<ElementManifest Location=”PageProvisionedFiles.xml”/>
</ElementManifests>
</Feature>

That’s it, the feature is complete.

All that needs to be done is copy the feature directory to “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\MyContentTypeFeature” and run the install command.

stsadm -o installfeature -filename MyContentTypeFeature\feature.xml

This command can be used to install and test the feature. For a production environment I would recommend creating a SharePoint solution that installs the feature and all its files.

MOSS9 / Creating Publishing Content Types

Thursday, July 10th, 2008

SharePoint team and Project server team at offshoresoftwaredevelopmentindia.com has great experience of creating web application based on MOSS 2007 and Project server 2007. That includes customization and development of webpart, site definitions, theme development, extension development, module creation. The team has developed CRM application, Job portal, Project management, to CMS applications based on MOSS 2007 and project server 2007.

Team would like to share same experience. This can help who wanted to begin with the sharePoint development and Project Server development.

There are list of articles start with SP and from number 1 to …. Always start with the article SP1 and read next article to start working on MOSS easily and quickly.

How to Create Site Columns:

Before going into detail on the creation of content types via features it is important to understand how Content type IDs work.

You should read the following MSDN page that explains about ContenTypes IDs and their inheritance based model: http://msdn2.microsoft.com/en-us/library/aa543822.aspx

Since this post shows how to create Publishing Content Types we need to find from which existing content type we want to base our own. I did some research on the features that are installed and activated when you use the Publishing site. In there we can see that the base content type from which we want to inherit is the “Page”. This Content Type has an ID of:

0×010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB0
64584E219954237AF39

So in order to create our own ID we can add two hexadecimal values, or, we can add “00″ followed by a GUID. I prefer this approach as it is unique and identifies custom content types more easily.

So my content type ID can be:

0×010100C568DB52D9D0A14D9B2FDCC96666E9F20079481
30EC3DB064584E219954237AF3900ADB88465BE2C439798977662094183BC

The bold text is the Page content type ID to which I append “00″ and a new GUID.

Content Type Schema:

Second important piece of information is the Content Type schema. I could not find any information specific to publishing content types on MSDN or the MOSS SDK. So again the solution is to use the available information together with some nosing in the publishing features installed by MOSS in the 12 hive. ContentType schema on MSDN: http://msdn2.microsoft.com/en-us/library/aa544268.aspx

In the following sample I’m creating two content types: a product content type and a hardware product content type. You will see that the hardware product content type inherits from the product content type by appending 00 + a new GUID to the ID.

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>

<!– Product base content type –>
<ContentType ID=”0×010100C568DB52D9D0A14D9B2FDCC96666E9F2007
948130EC3DB064584E219954237AF3900ADB88465BE2C43979
8977662094183BC” Name=”$Resources:contenttype_productbase_name;” Description=”$Resources:contenttype_productbase_description;” Group=”$Resources:group_productcontenttypes;” Sealed=”FALSE” Version=”0″>
<FieldRefs>
<FieldRef ID=”{F44BFBB0-4725-4167-B976-F85F84131AA3}” Name=”ProductCategory” Required=”FALSE” />
<FieldRef ID=”{EB19D87C-5DEE-4a73-85E0-506293D422D9}” Name=”ProductName” Required=”TRUE” />
<FieldRef ID=”{D73843E5-0D9F-4400-BC75-1A4C2BD27900}” Name=”ProductIntro” Required=”TRUE” />
<FieldRef ID=”{894635F9-1DF8-46f1-BC47-46EFF09FEF3D}” Name=”ProductDescription” Required=”FALSE” />
<FieldRef ID=”{D89C9409-2A97-4a7a-81F5-7D45E7CD8D6B}” Name=”LaunchDate” Required=”TRUE” />
<FieldRef ID=”{6036ECDE-521A-4dbe-94B4-40E0E4EF7029}” Name=”ProductImage” Required=”FALSE” />
<FieldRef ID=”{F31DF817-D220-4449-BD6F-2F1B7C0823ED}” Name=”ProductPrice” Required=”TRUE” />
</FieldRefs>
<DocumentTemplate TargetName=”/_layouts/CreatePage.aspx” />
</ContentType>

<ContentType ID=”0×010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3D
B064584E219954237AF3900ADB88465BE2C439798977662094183BC00B2DE
F3B02D274199BFF43C6D2F129D99″ Name=”$Resources:contenttype_hardwareproduct_name;” Group=”$Resources:group_productcontenttypes;” Sealed=”FALSE” Version=”0″>
<FieldRefs>
<FieldRef ID=”{6A08E31A-0620-45df-BAC1-54A4D0FBFDCE}” Name=”ProductManual” />
</FieldRefs>
<DocumentTemplate TargetName=”/_layouts/CreatePage.aspx” />
</ContentType>

</Elements>

Now we need to add this to the feature and install it together with what was done in part I of this series.

The complete feature can be downloaded here.

Refer:

http://www.katriendg.com/aboutdotnet/2007_4_2_publishing-content-types.aspx

MOSS5 / Create a Page Layout in Sharepoint

Saturday, June 7th, 2008

SharePoint team and Project server team at offshoresoftwaredevelopmentindia.com has great experience of creating web application based on MOSS 2007 and Project server 2007. That includes customization and development of webpart, site definitions, theme development, extension development, module creation. The team has developed CRM application, Job portal, Project management, to CMS applications based on MOSS 2007 and project server 2007.

Team would like to share same experience. This can help who wanted to begin with the sharePoint development and Project Server development.

There are list of articles start with SP and from number 1 to …. Always start with the article SP1 and read next article to start working on MOSS easily and quickly.

How to create a Page Layout in Sharepoint?

Page layouts are templates that define content structure for a page and are always associated with a content type. A content type contains a document template, data columns, workflows, and other information that completely define a document. The publishing feature of MOSS uses a single root content type for publishing called Page. All of the page layouts inherit from this base. Here’s how to create a new page layout in MOSS.

STEP 1:- Define Site Columns

The individual content elements that appear in a page layout are derived from site columns. When you create a page layout, you can use any of the site columns already defined or define your own.

STEP 2:- Define a Content Type

Page layouts have a direct relationship to a content type defined within the site. The content type is a collection of site columns, a page template, workflows, and other information that determine the appearance and behavior of a page layout. In order to create a page layout, you must create a new content type that derives from the existing Page content type. Inheriting the Page content type allows the new page layout to function correctly within the MOSS content management Feature.

STEP 3:- Create the Page Layout

Page layouts are stored in Master Page and Page Layout Gallery. From this gallery, you can create a new page layout and associate it with a content type. This process makes the site columns that are defined for the content type available to the page layout as field controls that you can place on the page with the SharePoint Designer.

STEP 4:- Edit the Page Layout in SharePoint Designer

Once you have created the new page layout, you must open it in the SharePoint Designer so that you can add the desired field controls. The site columns you defined as part of the content type become available in the SharePoint Designer as field controls that you can place on the page layout.

STEP 5:- Publish the New Page Layout

Once the page layout is created, you must publish and approve it so that it becomes available for content authors. This process is essentially the same as publishing any item in MOSS. First the document is checked in, then it is published, and finally it is approved.

STEP 6:- Create a New Page

Once the page layout is published and approved, content authors may use it to create new pages. This is done in the normal way by selecting the Create Page item from the Site Actions menu. After the page is created, the field controls may be edited to develop the actual page content.

MOSS4 / Create Minimal Master Page for SharePoint

Wednesday, May 14th, 2008

SharePoint team and Project server team at offshoresoftwaredevelopmentindia.com has great experience of creating web application based on MOSS 2007 and Project server 2007. That includes customization and development of webpart, site definitions, theme development, extension development, module creation. The team has developed CRM application, Job portal, Project management, to CMS applications based on MOSS 2007 and project server 2007.

Team would like to share same experience. This can help who wanted to begin with the sharePoint development and Project Server development.

There are list of articles start with SP and from number 1 to … Always start with the article SP1 and read next article to start working on MOSS easily and quickly.

How to Create Minimal Master Page for MOSS:

Go to Site Action -> Site setting -> Modify All Site Settings.

Then you will see the following screen. Then click on

Galleries -> Master pages and page layouts

You will see page as following image.

Click on default.master, it opens pop up then click send to -> Download a Copy

Save it to local drive. Rename defalt.master to maven.master. (Your referred name)

Then click on upload link.

Create Minimal Master Page

On clicking upload link following page will be displayed. Click browse, select .master file we have renamed and click ok.

Create Minimal Master Page

After clicking Ok, you will see following page. Select Content Type Publishing Master Page. Add the name and description. And click check in.

Create Minimal Master Page

Click on maven.master. we will see popup menu. Click on check out to make master page writable. Then click on maven.master, from popup click edit in Microsoft office sharepoint designer.

Create Minimal Master Page

This will open sharepoint server. Give the username and password of the site. The code of the current maven.master will be open.

Create Minimal Master Page

Replace code of the current maven.master with following code.


<%– Identifies this page as a .master page written in Microsoft Visual C# and registers tag prefixes, namespaces, assemblies, and controls. –%>
<%@ Master language=”C#” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<%@ Import Namespace=”Microsoft.SharePoint” %>
<%@ Register Tagprefix=”SPSWC” Namespace=”Microsoft.SharePoint.Portal.WebControls” Assembly=”Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>
<%@ Register Tagprefix=”SharePoint” Namespace=”Microsoft.SharePoint.WebControls” Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>
<%@ Register Tagprefix=”WebPartPages” Namespace=”Microsoft.SharePoint.WebPartPages” Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>
<%@ Register Tagprefix=”PublishingWebControls” Namespace=”Microsoft.SharePoint.Publishing.WebControls” Assembly=”Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>
<%@ Register Tagprefix=”PublishingNavigation” Namespace=”Microsoft.SharePoint.Publishing.Navigation” Assembly=”Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>
<%@ Register TagPrefix=”wssuc” TagName=”Welcome” src=”~/_controltemplates/Welcome.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”DesignModeConsole” src=”~/_controltemplates/DesignModeConsole.ascx” %>
<%@ Register TagPrefix=”PublishingVariations” TagName=”VariationsLabelMenu” src=”~/_controltemplates/VariationsLabelMenu.ascx” %>
<%@ Register Tagprefix=”PublishingConsole” TagName=”Console” src=”~/_controltemplates/PublishingConsole.ascx” %>
<%@ Register TagPrefix=”PublishingSiteAction” TagName=”SiteActionMenu” src=”~/_controltemplates/PublishingActionMenu.ascx” %>
<%– Uses the Microsoft Office namespace and schema. –%>
<html>
<WebPartPages:SPWebPartManager runat=”server”/>
<SharePoint:RobotsMetaTag runat=”server”/>

<%– The head section includes a content placeholder for the page title and links to CSS and ECMAScript (JScript, JavaScript) files that run on the server. –%>
<head runat=”server”>
<asp:ContentPlaceHolder runat=”server” id=”head”>
<title>
<asp:ContentPlaceHolder id=”PlaceHolderPageTitle” runat=”server” />
</title>
</asp:ContentPlaceHolder>
<Sharepoint:CssLink runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderAdditionalPageHead” runat=”server” />
</head>

<%– When loading the body of the .master page, SharePoint Server 2007 also loads the SpBodyOnLoadWrapper class. This class handles .js calls for the master page. –%>
<body onload=”javascript:_spBodyOnLoadWrapper();”>
<%– The SPWebPartManager manages all of the Web part controls, functionality, and events that occur on a Web page. –%>
<form runat=”server” onsubmit=”return _spFormOnSubmitWrapper();”>
<wssuc:Welcome id=”explitLogout” runat=”server”/>
<PublishingSiteAction:SiteActionMenu runat=”server”/>
<PublishingWebControls:AuthoringContainer id=”authoringcontrols” runat=”server”>
<PublishingConsole:Console runat=”server” />
</PublishingWebControls:AuthoringContainer>
<%– The PlaceHolderMain content placeholder defines where to place the page content for all the content from the page layout. The page layout can overwrite any content placeholder from the master page. Example: The PlaceHolderLeftNavBar can overwrite the left navigation bar. –%>
<asp:ContentPlaceHolder id=”PlaceHolderMain” runat=”server” />
<asp:Panel visible=”false” runat=”server”>
<%– These ContentPlaceHolders ensure all default SharePoint Server pages render with this master page. If the system master page is set to any default master page, the only content placeholders required are those that are overridden by your page layouts. –%>
<asp:ContentPlaceHolder id=”PlaceHolderSearchArea” runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderTitleBreadcrumb” runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderPageTitleInTitleArea” runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderLeftNavBar” runat=”server”/>
<asp:ContentPlaceHolder ID=”PlaceHolderPageImage” runat=”server”/>
<asp:ContentPlaceHolder ID=”PlaceHolderBodyLeftBorder” runat=”server”/>
<asp:ContentPlaceHolder ID=”PlaceHolderNavSpacer” runat=”server”/>
<asp:ContentPlaceHolder ID=”PlaceHolderTitleLeftBorder” runat=”server”/>
<asp:ContentPlaceHolder ID=”PlaceHolderTitleAreaSeparator” runat=”server”/>
<asp:ContentPlaceHolder ID=”PlaceHolderMiniConsole” runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderCalendarNavigator” runat =”server” />
<asp:ContentPlaceHolder id=”PlaceHolderLeftActions” runat =”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderPageDescription” runat =”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderBodyAreaClass” runat =”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderTitleAreaClass” runat =”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderBodyRightMargin” runat=”server” />
</asp:Panel>
</form>
</body>
</html>


Above code is default code for any master pages. Whatever our design we need, code it in this file. There is one content place holder which holds the page layout.

Save the file. Then go to master page and layouts page from the site as follows.

Create Minimal Master Page

Click on maven.master and click check in. This will open following page. Select Major Version (publish). And click open.

Create Minimal Master Page

Again click maven.master and click Approve/Reject from popup. And click approve.

Create Minimal Master Page

To change the master page of current site, go to;

Site action -> site settings -> modify all settings

Look and Feel -> Master page

This will open following form,

Create Minimal Master Page

Select maven.master.
This will apply maven.master to current site.

Fore more details please refer:

http://msdn2.microsoft.com/en-us/library/aa660698.aspx

MOSS2/Working with Web Application and Site Collection

Monday, April 14th, 2008

SharePoint team and Project server team at offshoresoftwaredevelopmentindia.com has great experience of creating web application based on MOSS 2007 and Project server 2007. That includes customization and development of webpart, site definitions, theme development, extension development, module creation. The team has developed CRM application, Job portal, Project management, to CMS applications based on MOSS 2007 and project server 2007.

Team would like to share same experience. This can help who wanted to begin with the sharePoint development and Project Server development.

There are list of articles start with SP and from number 1 to …. Always start with the article SP1 and read next article to start working on MOSS easily and quickly.

Working with Web Application and Site Collection:

To start working with WA (Web Application) and SC (Site Collection), open web application we have created by entering link into browser. We need to log in by user name and password which we have given to web application.

See to the following image for home page of the web application. The most important control on the webpage is site Actions.

Working with WebApplication And SiteCollections

If you click on the site action button you will see the menu with so many options.

Go to Site Action -> Site setting -> Modify All Site Settings.

Working with WebApplication And SiteCollections

After clicking Modify All site Settings you will see following screen.

Working with WebApplication And SiteCollections

Change theme of the website:

Please go to

Go to Site Action -> Site setting -> Modify All Site Settings.

Then you will see the following screen. Then click on

Look and feel -> Site theme

Working with WebApplication And SiteCollections

Then you will see the following screen to change the theme. Select theme you want and apply it.

Working with WebApplication And SiteCollections

After applying we can see the new theme as following screen.

Working with WebApplication And SiteCollections

Working with master pages and templates:

Please go to

Go to Site Action -> Site setting -> Modify All Site Settings.

Then you will see the following screen. Then click on

Galleries -> Master pages and page layouts

Working with WebApplication And SiteCollections

On clicking master pages you will see page as shown in following image.

Working with WebApplication And SiteCollections

Master Page:

ASP.NET master pages allow you to create a consistent layout for the pages in your application. A single master page defines the look and feel and standard behavior that you want for all of the pages (or a group of pages) in your application. You can then create individual content pages that contain the content you want to display. When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the content page.

How Master Pages Work:

Master pages actually consist of two pieces, the master page itself and one or more content pages.

A master page is an ASP.NET file with the extension .master (for example, MySite.master) with a predefined layout that can include static text, HTML elements, and server controls. The master page is identified by a special @ Master directive that replaces the @ Page directive that is used for ordinary .aspx pages.

In addition to the @ Master directive, the master page also contains all of the top-level HTML elements for a page, such as html, head, and form. For example, on a master page you might use an HTML table for the layout, an img element for your company logo, static text for the copyright notice, and server controls to create standard navigation for your site. You can use any HTML and any ASP.NET elements as part of your master page.

Replaceable Content Placeholders:

In addition to static text and controls that will appear on all pages, the master page also includes one or more ContentPlaceHolder controls. These placeholder controls define regions where replaceable content will appear. In turn, the replaceable content is defined in content pages. After you have defined the ContentPlaceHolder controls, a master page might look like the following.


C#
<%@ Master Language=”C#” %>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML
1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>

<html>
<head runat=”server” >
<title>Master page title</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<table>
<tr>
<td><asp:contentplaceholder id=”Main” runat=”server” /></td>
<td><asp:contentplaceholder id=”Footer” runat=”server” /></td>
</tr>
</table>
</form>
</body>
</html>


Working WebApplication And SiteCollections

MOSS1 – Create Web Application and Site Collections

Friday, April 4th, 2008

SharePoint team and Project server team at offshoresoftwaredevelopmentindia.com has great experience of creating web application based on MOSS 2007 and Project server 2007. That includes customization and development of webpart, site definitions, theme development, extension development, module creation. The team has developed CRM application, Job portal, Project management, to CMS applications based on MOSS 2007 and project server 2007.

Team would like to share same experience. This can help who wanted to begin with the sharePoint development and Project Server development.

There are list of articles start with SP and from number 1 to …. Always start with the article SP1 and read next article to start working on MOSS easily and quickly.

Installation: SharePoint server 2007 must be installed to perform all the actions.

Create Web Application:

To start working with share point server we need to first install share point server 2007 if it is not installed.

After installation we need to run share point product and services configuration wizard from the

Start menu -> Microsoft office Server -> SharePoint Products and Technologies Configuration Wizard.

See the following image.

Create WebApplication And SiteCollections

Central Administration:

First time to work with the share point server, we need to work with share point central administration.

Start menu -> Microsoft office Server -> Share Point 3.0 Central Administration.

See the following image.

Create WebApplication And SiteCollections

The following image displays the central administration home page. There are three tabs in the central administration panel.

  1. Home
  2. Operations
  3. Application Management

Home Tab:

Create WebApplication And SiteCollections

Operations Tab:

Create WebApplication And SiteCollections

Application Management Tab:

Create WebApplication And SiteCollections

Creating Web Application:

To work with the share point site or to create a new share point site first we need to create share point Web Application.

A Web application is comprised of an Internet Information Services (IIS) site with a unique application pool and can be assigned to an SSP (Shared Services Provider) to enable features such as InfoPath Forms Services, Excel Calculation Services, and Workflows.

To create share point web application, go to

Central administration -> Application Management

Then click on SharePoint Web Application Management -> Create or extend web Application

Create WebApplication And SiteCollections

Create WebApplication And SiteCollections

Create WebApplication And SiteCollections

Create WebApplication And SiteCollections

Create WebApplication And SiteCollections

Provide above mentioned information to the site like website description, Port, Configurable User Name and Password.

Then click OK.

After that we can see following processing screen.

Create WebApplication And SiteCollections

After completion of the processing we can see following application created screen.

Create WebApplication And SiteCollections

Creating Site Collection:

A site collection is a group of sites built on Microsoft Windows SharePoint Services that all exist under a top-level site.

After creating web application, to work with web application we need to create site collection. We cannot work in empty site collection. We have to create site collection.

To create a site collection we need to go to central administration -> Application Management.

Create WebApplication And SiteCollections

We need to select web Application for which we need to create site collection as following screen.

Create WebApplication And SiteCollections

This will show us the list of the site application as following screen. We need to create site application we created ex. Yahoo-1111. Click on Yahoo-1111 as following screen.

Create WebApplication And SiteCollections

Then our web application path will be changed to our created web application’s path with mentioned port-1111 as following screen.

Create WebApplication And SiteCollections

Then we need to feel the data like title, Description, URL, Template, primary site collection administrator and secondary site collection administrator for the site collection as following screen.

URL:

We are creating first site collection for the Web Application so we need to select base site (root site) in the URL. Select “/”.

Template:

There are many types of templates available. There are for tabs for the template. We are creating publishing site so we need to create publishing tab and then need to select publishing portal.

Site Collection Administrator:

Site Collection Administrator should be user of the current server, either from administrative group or from non administrative group.

Please see the following image for all these details.

Create WebApplication And SiteCollections

After submitting above details we will see following processing screen.

Create WebApplication And SiteCollections

On completion of the processing we will get message top level site collection successfully created as per following screen.

Create WebApplication And SiteCollections

Site collection is created successfully.

Now we can work with web application with mentioned URL – http://server03:1111/.

  • QUICK QUOTE

     

    cforms contact form by delicious:days

  • CLIENT SPEAKS

    The team at Maven Infosoft has been simply awesome, they provide a great service and are easy to communicate remotely with and have a quick response time.


Country
State / County
City