Software Development Technologies and Solutions
SharePoint | .NET | MCMS | MS SQL | Office

Microsoft Windows SharePoint Services 3.0 (WSS 3.0) the great, versatile and free technology from Microsoft provides a foundation platform for building Web-based business applications that can flex and scale easily to meet the changing and growing needs of any organization, and by little customization you can have a great collaboration or even content management portal.


First thing needed to be considered is to build a better navigation for WSS, so let’s begin.
If you created a WSS team site, you will get a following page:

 

WSS 3.0

 

In this page and under Site Action Menu you will find the following items:

 

WSS Menu

 

That is good, however I felt that this menu needs more items, what about adding View All Site Content  and Recycle Bin menu items, to achieve that you need to install SharePoint Designer first, after that open the default.master from the following path: "/_catalogs/masterpage/"
In the bottom design area click on Site Action control, this will highlight the source in the Source area.

 

SPD WSS

Now in the appropriate position between menu items and before </SharePoint:FeatureMenuTemplate>  paste the following code as shown


<SharePoint:MenuItemTemplate runat="server" id="MenuItem_Contents"
 Text="View All Site Contents"
 Description="Browse all site lists and subsites"
 ImageUrl="/_layouts/images/Actionscreate.gif"
 MenuGroupId="100"
 Sequence="300"
 UseShortId="true"
 ClientOnClickNavigateUrl="~site/_layouts/viewlsts.aspx"
 PermissionsString="EnumeratePermissions,ManageWeb,ManageSubwebs,
 AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData
"
 PermissionMode="Any" />
 
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_Recycle"
 Text="<%$Resources:wss,StsDefault_RecycleBin%>"
 Description="Manage deleted items"
 ImageUrl="/_layouts/images/Recycle32x32.png"
 MenuGroupId="100"
 Sequence="300"
 UseShortId="true"
 ClientOnClickNavigateUrl="~site/_layouts/recyclebin.aspx"
 PermissionsString="DeleteListItems,EnumeratePermissions,ManageWeb,ManageSubwebs,
 AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData
"
 PermissionMode="Any" />

 

WSS SPD

 

Then save the page and refresh the site on the explorer to get the following menu:

 

WSS Menu

 

 

What we need in the next step is to enhance inside pages and sub-sites navigation, in my case I don’t need the quick launch control, and I just wanted to view inside pages and sub-sites.

 

There is something you already know in SharePoint Server (MOSS), the “Pages” document library, which created by default in each publishing site, the idea is to create the same library here and then we can list its pages in a new control. So at this stage we need:
1. Create a user control for inside navigation
2. List inside pages
3. List sub-sites

Creating a user control to be set on the master page is too easy:
1- Locate the following folder: “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES”
2- Create a new user control file ex: ucNavMenu.ascx having the following code:

 


<%@ Control Language="C#" ClassName="ucNavMenu" %>


3- Include the following line in you master page after: <@Master language="C#"%>

 


<%@ Register TagPrefix="isauc" TagName="NavMenu" src="~/_controltemplates/ucNavMenu.ascx" %>

4- In the appropriate place where you want this control to appear put the following code:


<asp:ContentPlaceHolder id="NavMenuPlaceHolder" runat="server">
 <isauc:NavMenu id="IdIsaNavMenu" runat="server"/>
</asp:ContentPlaceHolder>   

 

Now, it is the right time to write our code for listing menu items, in my case it is decided to list pages then sites, and I found it a good idea to read sub-sites from current quick launce navigation object, here is the full code:

 

<%@ Control Language="C#" ClassName="ucNavMenu" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Import Namespace="Microsoft.SharePoint.Utilities" %>

<%
    SPWeb currentWeb = SPContext.Current.Web;
    string CrLf = "\n\r";
    string navContent = "";

    try
    {
        //Reference subsites in quicklaunch
        Microsoft.SharePoint.Navigation.SPNavigationNodeCollection secNvc = currentWeb.Navigation.GetNodeById(1026).Children;

        //--- List Pages ----
        SPList list = currentWeb.Lists["Pages"];

        if (secNvc.Count != 0 || list.Items.Count != 0)
        {
            navContent += "<ul>";

            foreach (SPListItem item in list.Items)
            {
               
// Exception for home page

                if (currentWeb.Title == "Home")
                {
                    break;
                }
                string itemUrl = currentWeb.Url.ToLower() + "/" + item.Url.ToLower();

                if (item.Title != null)
                {
                    if (item.Title != "")
                    {

                        navContent += "<li><a href='" + itemUrl + "'>" + SPEncode.HtmlEncode(item.Title) + "</a></li>" + CrLf;
                    }
                    else
                    {
                        navContent += "<li><a href='" + itemUrl + "'>" + SPEncode.HtmlEncode(item.Name) + "</a></li>" + CrLf;
                    }
                }
                else
                {
                    navContent += "<li><a href='" + itemUrl + "'>" + SPEncode.HtmlEncode(item.Name) + "</a></li>" + CrLf;
                }
            }

            //--- Subsites ----

            foreach (Microsoft.SharePoint.Navigation.SPNavigationNode node in secNvc)
            {
                navContent += "<li><a href='" + node.Url + "'>" + node.Title + "</a></li>" + CrLf;
            }

            navContent += "</ul>" + CrLf;
        }
    }
    catch (Exception ex)
    {
        //Response.Write(ex.Message);
    }

    Response.Write(navContent);
  
%>

 

And you can give a SharePoint default style to this menu to appear as below:

 

menu WSS

 

Still one issue and I guess it is very important, navigation to page properties to set page title after page creation is a problem in WSS, since we have to go to the list item and edit its properties, however we can overcome this problem by modifying the designmodeconsole.ascx user control (design mode tool which appears after editing the page) located in the same folder, the modification is to add a link to list item properties to appear like the following:

 

WSS Tool

 

To do so add the following code to this control

<td class="ms-consolestatus">
 &nbsp;&nbsp;&nbsp;&nbsp;
  <%
          string itemID = "";
          try
           {
               if (SPContext.Current.Item != null)
               {
                     itemID = SPContext.Current.ItemId.ToString();
                     Response.Write("<a href='Forms/EditForm.aspx?ID=" + itemID +
"' target='_blank'><b>Click here</b></a> to set page properties &nbsp; &nbsp; &nbsp; &nbsp;");
                 }
           }
           catch
           {
           }
 %>


</td>

And this is after this portion of code:


<td class="ms-consolestatus">&nbsp;
 <SharePoint:PageModeIndicator id="pmi2" runat="server"/>
</td>

 

Last October, Microsoft announced the upcoming release of the 2nd service pack for the 2007 Microsoft Office System and the 2007 Microsoft Office servers. Today, Microsoft provides both a formal release date, and more details on what you should expect to see in SP2.

Read more

 

VS 2010Since the first release of Visual Studio 2005 Extensions for SharePoint which allowed us for developing custom SharePoint solutions, I’ve expected more support tools and templates for SharePoint in the next versions of Visual Studio, and I was always searching on what is new  regarding SharePoint development, Somasegar from Visual Studio team has listed some new features of the next release of Visual Studio which support SharePoint development, I believe that a wide range of these features are expected, however I guess we expect more, I will give you a brief about what I need from Microsoft in this release:


1- Creating lists & libraries and managing their properties and content
2- Creating and extending publishing controls
3- Creating content types and custom fields in easier way
4- Easier way for handling SharePoint events
5- Built-in SharePoint AJAX controls
6- Creating and managing workflows on site level as well as on list level
7- More facilities creating custom web parts in addition of automated deployment packages
8- Ability to open and fully managing SharePoint portal content
9- Built- in customization and branding tools
10- Automated portal deployment packages
11- Smarter debugging
12- And even more…


I’m really glad because most of these features will be added to Visual Studio 2010, and we’ll keep dreaming with next improvements.

Microsoft announced the key capabilities and expected timeline for the next wave of Microsoft Office and related products. a discussion with Chris Capossela, senior vice president of Microsoft’s Information Worker Product Management Group, to find out more about how the next version of Microsoft Office-related products will deliver a synchronized experience across devices and provide greater choice and flexibility for customers.

http://www.microsoft.com/presspass/features/2009/Apr09/04-15Office2010.mspx

 

Good day everyone, first accept my apologies for being silent last year; actually I was very busy managing my team in a number of big SharePoint projects. 


Today, I came with a tool for customizing SharePoint websites look and feel, and you also can use it for any website, because it is designed to override default CSS classes of any website.


I’ve developed this tool specifically to customize look and feel without touching default CSS files of SharePoint.


Features:
1- Opens any online site or offline page and apply your new styles without refreshing the page by few steps
2- Displays current CSS class attributes by click the class name
3- Full review of the page HTML and styles through:
     a. Mouse selections of the item
     b. HTML tree view
     c. Property box
4- You can add new/existing images and it will appended automatically to the CSS
5- Auto Complete CSS feature
6- You can append more than one CSS file
7- Color Picker tool which applies the Color code automatically to the CSS
8- Exports the full package to be applied on either SharePoint or any website


 

1spc.png

 

To use this tool, you need to:
1- Create new project, in this step you will be asked to specify location and project name.

 

5spc.png


2- Open your SharePoint website, by writing URL into address bar, you can stop browser navigation by clicking the first icon or from Action menu
3- Add new CSS file to override default classes, and you will be able to add more than one CSS file

 

2spc.png


4-  You have the ability to select the HTML element directly by mouse or from the source tree in the bottom
5- After you select the HTML element, the class name will appear, and you can review the default styles inside this class be clicking the class name

 

4spc.png

 


6- If you clicked on override button for the class or element ID, you will be able to write the new styles in the bottom right text area, which has auto complete feature

 

Note: Don't forget to append "!important" keyword to the style to override the attribute in case of being used in default CSS styles.

ex: .ms-topnav {height:30px !important;}


7-  You can add new images to the new CSS, the tool creates a folder for images and another one for CSS files
8- After you finish writing your styles, click “Apply” button to save and apply directly on without refreshing the page.
9- In the last step export your package to be applied on your default Master Page
 

Download this tool for free  from CodePlex, You will need to install .NET framework 3.5