SharePoint Server 2007 Training for End Users

with 2 comments

Recently, In one of the mailing list I came across a question that is very commonly asked by many enterprise customers:

Now that we have SharePoint deployed, How do I train my users?

These users can be Business end users, Helpdesk staff, IT teams etc.

Here are the three links that I think would act as a Starting Point for any good training. They are an excellent resource for Beginners and Novice users alike:

  1. Introduction to Microsoft Office SharePoint Server 2007
  2. Microsoft Office SharePoint Server 2007
  3. Roadmap of using SharePoint Server 2007

Written by Manoj

8. February 2010 13:40

Posted in Sharepoint

Tagged with ,

Retrieving SharePoint Blog Post HTML

without comments

image Following my series of retrieving HTML from SharePoint - I had to recently retrieve the HTML from the Blog post in SharePoint.

One again - it is pretty straight forward but as the Blogs are a different site compared to SharePoint MySite - you will need to develop a feature at a Site Collection level.

 

 

public bool Convert(string ItemId, string SiteUrl)
{
    //Get Site, Web, List and Retrieve ListItem
    using (SPSite Site = new SPSite(SiteUrl))
    {
        using (SPWeb Web = Site.OpenWeb())
        {
            SPList List = Web.Lists["Posts"];
            SPListItem ListItem = List.GetItemById((Int32.Parse(ItemId)));
            HTML = String.Format("<html><body>{0}</body></html>", 
                   ListItem["Body"].ToString());
        }
    }
}

The list you are retrieving data from here is "Posts".

Written by Manoj

3. June 2008 00:22

Posted in Sharepoint

Tagged with ,

Retrieve SharePoint Wiki HTML

without comments

image Recently, I had to retrieve the HTML of SharePoint Wiki pages. The only example I could find   was Arpan shah's blog post about Grabbing Wiki content.

Turns out that it is not difficult as I thought and Wiki is just a List in SharePoint and you can retrieve the HTML content using the following code:

 

 

//ListId : List ID of Wiki List
//SiteUrl: Current Site URL
//ItemId: Item ID of wiki page
public string GetWikiHTML(string ListId, string ItemId, string SiteUrl)
{    
    //Get Site, Web, List and Retrieve ListItem
    using (SPSite Site = new SPSite(SiteUrl))
    {
        using (SPWeb Web = Site.OpenWeb())
        {
            SPList List = Web.Lists[new Guid(ListId)];
            SPListItem ListItem = List.GetItemById((Int32.Parse(ItemId)));
            string wikiHTML = String.Format("<html><body>{0}</body></html>", 
            ListItem[ListItem.Fields.GetFieldByInternalName("ows_WikiField").Id].ToString());
        }
     }
}

 

If you have read my previous post you will notice that is it very easy to retrieve ListID, ItemID and SiteURL using SharePoint Custom Actions (List of URL Tokens for Custom Action) or for the toolbar - on the page retrieval you can use following piece of code:

SPContext SiteContext = null;
String ListId, ItemId, SiteUrl;
 
// Get current context
SiteContext = SPContext.GetContext(HttpContext.Current);
if (SiteContext != null)
{
    ListId = SiteContext.List.ID.ToString(); // Get Current Wiki List ID
        ItemId = SiteContext.ListItem.ID.ToString(); // Get current Wiki page Id
        SiteUrl = SiteContext.Web.Url.ToString(); // Get SiteUrl of Wiki Page
}

 

Hope this helps. If there is a better way of doing this - please leave me a comment.

Written by Manoj

2. June 2008 14:04

Posted in Sharepoint

Tagged with ,

EditControlBlock (ECB) menu item in SharePoint Wiki and Blogs

with 1 comments

In a recent project, I had to add an ECB item (shortcut menu, context menu) for wiki pages and blog posts in Microsoft Office SharePoint Server 2007. It was a quest to find the right ContentType.

Sharepoint ECB

To add a menu item for Wiki, you can create a Custom Action in the Feature.XML of your SharePoint feature. Here is how you define the custom action:

<CustomAction
Id="MyCustomID"
RegistrationType="ContentType"
RegistrationId="0x010108"
Location="EditControlBlock"
Sequence="500"
ImageUrl="/_layouts/images/icdocx.gif"
Title="$Resources:ResourceFileName,contextMenuText;">
<UrlAction Url="/_layouts/Processor.aspx?ListId={ListId}" />
</CustomAction>

 

 

For blog posts in SharePoint, you will have to create the following Custom Action:

<CustomAction
Id="MyCustomID"
RegistrationType="ContentType"
RegistrationId="0x0110"
Location="EditControlBlock"
Sequence="467"
ImageUrl="/_layouts/images/icdocx.gif"
Title="$Resources:ResourceFileName,contextMenuText;">
<UrlAction Url="/_layouts/Processor.aspx?ListId={ListId}" />
</CustomAction>

Note that the scope of the Feature should be Site Collection as Blogs are separate sites in SharePoint.

You can extend almost every type of menu by creating a custom action for it. In SharePoint all you need is the following three links to implement a Custom Action:

  1. Add Action to Sharepoint User interface
  2. Determinte ContentTypes, Locations and Groups
  3. Confirm in Base Content Type Hierarchy

Written by Manoj

13. May 2008 15:32

Posted in Sharepoint

Tagged with ,