Wednesday, December 30, 2009

Variations in MOSS2007

From Last few months i have been working on WCM features for one of the world class intranet portal. Especially on PageLayouts for publishing article pages,List templates,Site Definition ,Conent Types,WebParts,Social sites from NewsGator and Variations.
In this post I would like to explain how to implement multilingual on MOSS.
1. Open the Site Settings of the top-level site and click on Variation Settings.
2. On the Variation Settings page

3. In the Site Settings page, click now on Variation Labels.
A. Click New Label and create the source label.
B. Enter English as the label name.
C. Set English as the display name.
D. Set the local to English (United States)
E. Check Set this variation to be the source variation.
F. Select appropriate site template
(In the below screencast we are using custom site definition)
G. Click OK.

4. Like that we r using 10 variation Labels

Based on the profile settings and browser settings default locale page would open.User can select required language based on the user control

Wednesday, December 2, 2009

Knowledge Champion on MOSS?

On 18th Nov Winners League'09 held in HCL,Noida.
I have selected as a SharePoint Knowledge Champion and am HCL T2ID SharePoint Trainer also.

I’m really pleased to get the award, as it’s nice to be recognized by HCL T2ID for what I’ve done. I find it useful (to me anyway!) to have a bit of reflection on what I’ve been up to for the last year.

Friday, November 20, 2009

Importance of PortalSiteMapProvider in WCM?

PortalSiteMapProvider provides a nice automatic caching infrastructure for retrieving list data. The class includes a method called GetCachedListItemsByQuery that was used in this test. This method first retrieves data from a list based on an SPQuery object that is provided as a parameter to the method call. The method then looks in its cache to see if the items already exist. If they do, the method returns the cached results, and if not, it queries the list, stores the results in cache and returns them from the method call.
SPQuery strQuery = new SPQuery();
strQuery.RowLimit = 1;
//Retrieve the items for the specified Target location from the Target list
strQuery.Query = "CAML query...";
PortalSiteMapProvider ps = PortalSiteMapProvider.WebSiteMapProvider;
PortalWebSiteMapNode pNode = ps.FindSiteMapNode(web.ServerRelativeUrl) as PortalWebSiteMapNode;
SiteMapNodeCollection pItems = new SiteMapNodeCollection();
pItems = ps.GetCachedListItemsByQuery(pNode, "targetListName", strQuery, web);
//Check if there are items for the specified target location
if (pItems.Count != 0)
{
try
{
//Retrieve the most recently created item for the specified Target location from the list
foreach (PortalListItemSiteMapNode pItem in pItems)
{//TODO}
catch (Exception ex)
{}
}

Monday, November 9, 2009

How to install Visual Studio 2010?

If you are a MSDN subscriber, you can download Visual Studio 2010 from here.
If you want to know how to download and install Visual Studio 2010 watch Channel9 video.
To get you started, head over to MSDN and read some of the walkthroughs on SharePoint Development in Visual Studio 2010.

Tuesday, November 3, 2009

How to Display SAP Preferred Welcome Name?

I got the requirement that based on preferred name the welcome name should come.
Go to Shared Services Administration: SSP1 > User Profile and Properties > View User Profiles
Modify ur preferred name as per screenshot

Refer How to modify profile properites
Go to My site click on details link and modify ur name filed with ur prefer name.

Run the below cmd

After the sync has been performed the User Info table will be updated with the values from the My Profile details.

Friday, October 30, 2009

The site collection could not be restored!!!

I have been doing base line of my application in my VM.I have two site collection in my web application. Each has its own database…
I got the following error while doing restore site collection.

Resolution:
Delete the corresponding DB ,next recreate new DB for your site collection and try to restore again.
It should work

Thursday, October 22, 2009

Creating Custom Page Layouts notes?

Overview of Page Layouts?
Combined with master page to define the rendering of a content page
􀂃 Obtains master page from SPWeb.CustomMasterUrl
• Hosts field controls and Web Part zones
• Complies to the Page Layout content type
• Has an associated content type
􀂃 Dictates which content type the page layout is used for rendering
• Can bind multiple page layouts to content type
• Associated with exactly one content type
Page layouts live within the Master Page Gallery
􀂃 http://servername/_catalogs/masterpage
􀂃 Exists only in the top-level site within a site collection
• Upon site provisioning, page layout added to Master Page Gallery as GhostableInLibrary
􀂃 While living in the Master Page Gallery as uncustomized the page layout on the file system is used
Site Columns & Content Types In Publishing Sites
Site columns & content types play a key role in Publishing sites
• Both are used to define schema for content pages
• Content types must inherit from the Page content type (which inherits from System Page)
􀂃 Go to the following location for basic information
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\PublishingResources\PublishingContentTypes.xml
􀂃 The article page layout with the following content type

• Page layouts must be associated with content types
Why site Column?
Reusable column template for use within lists and content types
• Specify:
􀂃 Name & description
􀂃 Data type
􀂃 Site column group
• Scoped at the site level
􀂃 Available to child sites
• Adding to a list / content type creates a copy.
Create / manage many ways:
􀂃 Browser-based user interface
􀂃 SharePoint object model
􀂃 Feature XML
• Features & object model provide most control
􀂃 Easy to version in virtually all source control systems
􀂃 Highest level of reuse
Creating Site Columns with Features

Wt is the Content Types?
Enable storage of different types of content in
same list or library
• Specify:
􀂃 Name & description
􀂃 Site columns, workflows, event receivers, policies, etc.
􀂃 Content type group
• Scoped at the site level
􀂃 Available to child sites
• Adding to a list creates a copy
Create / manage many ways:
􀂃 Browser-based user interface
􀂃 SharePoint object model
􀂃 Feature XML
Creating Content Types with Features

Activate our feature..

After activation site columns and content types would appear like the below.

How to create a page layout using SPD2007?

Now you need to add some structure to this page. Cheat a bit by copying the contents of the ArticleLeft.aspx page layout and paste them into CusomPageLayout.aspx.
Drag and drop our site columns in a structured maner.Here I just drag n droping….


Wt are the difference b/w Field controls and WebParts?

I will try to explain how to deploy page layout through studio in future posts.
Thanks my WCM guru and Ian for giving support.