SharePoint In Action

An attempt to share my day-to-day SharePoint experience

Archive for the category “SharePoint 2010 Branding”

How To Determine If A site Is A SharePoint Publishing Site

Hi all,

Sometimes in order to customize the navigation for your site, you would need to determine if your site is a publishing site or a non-publishing one. The reason is that the navigation customization options for a publishing site are more extensive than those available for a non-publishing site.Here is all you would need to do: 

Go to “Site Actions” menu –> Site Settings –> Look and Feel

  • If you see a link titled Navigation, then you are working with a publishing site and you can customize your site using the Site Navigation Settings page.
  • If you see links titled Top link bar and Quick Launch, then you are working with a non-publishing site and you have a more limited set of navigation configuration options available to you. 

Cheers,

Nader Heshmat

Image

Image

Location of SharePoint Branding CSS files

Hi,

Here is where you will find SharePoint 2010 CSS files for re-branding your sites:

File Name Location(relative from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14)
Search.css TEMPLATE\LAYOUTS\{Locale-ID}\STYLES\Themable\Search.css
Wiki.css TEMPLATE\LAYOUTS\{Locale-ID}\STYLES\Themable\Wiki.css
Corev4.css TEMPLATE\LAYOUTS\{Locale-ID}\STYLES\Themable\Corev4.css
Controls.css /Style Library/{Language-Culture}/Themable/Core Styles/Controls.css
Page-Layouts-21.css /Style Library/{Language-Culture}/Themable/Core Styles/Page-Layouts-21.css
Nightandday.css /Style Library/{Language-Culture}/Themable/Core Styles/Nighandday.css

** {Language-Culture} is a placeholder for language and culture; for example, en-us. The {Locale-ID} is another placeholder for locale ID; for example, US English is 1033.

Cheers,
Nader Heshmat

Randy Drisgill’s Starter Master Pages for SharePoint

Hi,

Just wanted to share this cool link. It’s Randy’s SharePoint 2010 customized master page. A very good starting point for branding your SharePoint sites:

http://startermasterpages.codeplex.com/

Cheers,
Nader Heshmat

Programmatically Creating SharePoint 2010 Wiki Pages Based On Your Own Wiki Templates

Hello all,

Last week I was asked to prepare a tool for our company intranet users to let them create new Wiki pages based on pre-made Wiki templates. Here is what I did in order to create the tool:

–          Created a Wiki page library to store my Wiki pages

–          Created a Wiki page library to store my Wiki page templates

–          Created a SharePoint 2010 sandboxed web part in VS 2010. The web part had these functionalities:

  1. Reading  the Wiki page template list and showing the name of templates in a drop down list
  2. Getting a name for the new Wiki page as well as the template name
  3. Creating the new Wiki page based on the template which was selected

Here is a screen shot for the web part:

Web Part - Customized Wiki Pages

Web Part – Customized Wiki Pages

and Here is the link to the code for our Web Part:

Web Part Code – Customized Wiki pages

Notes:

–          In CreateChildControls method, the web part’s interface is built

–          In PopulateTemplatesDropDown method we read the templates list and show the names in a dropdown list

–          In GetWikiTemplateContent method we get the content of selected template

–          In ChangeWikiContent method we swap the content of newly created wiki with template’s content

The most important trick is accessing the “WikiField” item of a Wiki page. It contains the content of the Wiki page. Once you have it, all you need to do is change it with whatever you like.

Hope this helped you create your own Wiki pages based on your customized Wiki templates.

Cheers,
Nader Heshmat

Post Navigation