SharePoint 2013 – How to add reference to a css file in a page layout

I had problems with adding my custom CSS file to my SharePoint 2013 page layout and it took a while to figure out what the problem was. I first tried to add a link tag just under the system CSS files but when the page was rendered, the css did not get attached.

After some googling, I found that there are two components that allows you to add a link tag to a page layout.

Firstly, you need to find the following lines of code in the head of the Page Layout’s HTML page:

Continue reading…

 

SharePoint architecture – A simple overview

It is important to have some knowledge about the SharePoint architecture in order to understand how the different parts interact.

SharePoint Farm – This is the whole SharePoint solution, including the physical and / or virtual servers running on the solution. The farm is managed by the Central Administration tool. There can be from one to hundreds of servers in a farm; SQL servers, application servers, and web front end servers. All those server roles can be hosted on the same physical server, but usually at least the SQL server is on its own physical server and very commonly they are all located on separate servers.

Continue reading…

 

Managed navigation – New items not showing

We have been having a recurring problem with adding new items to the managed navigation on a client’s SharePoint 2013 site. When the client adds new tags to the managed navigation term set in the term store, the change is not propagated throughout their whole site collection.

The links are added to the global navigation on the main site, but not on sub sites, even though the sites are set to inherit the menu items from the parent site.

Continue reading…

 

Force your style tags into effect on a SharePoint site

If you have been trying to change the style and design of default elements in a SharePoint 2013 site, you probably have been strugling with getting your changes to take effect. I certainly know that I have.

Try adding the !Important attribute to your style tags in order to override the default styles of the system. I can’t even count how many times I have had to do this in order for my style changes to take effect.

Continue reading…

 

Content query list reference disappears

Our client had a problem with project sites created from a custom site template not showing documents related to the project.

It turned out that the content query web part reference which was supposed to point to the default document library on the root site had disappeared.

This is a problem I have encountered quite a few times before and in order to fix it you have to modify the web part page in SharePoint Designer. The problem only seems to occur when the reference is set to a list or library on the root site.

  • Open up the site in SharePoint Designer
  • Open up the web part page where the problem occurs. In our case it was the home page (home.aspx) of the site.
  • Search for ~sitecollection
  • Replace ~sitecollection with /
  • Save the page and create a new site template from the site

The content query web part now retain the correct path to the list/library even when the site is created from new custom site template.

 

Broken web part prevents page from opening

​If you have a broken web part that prevents your web part page from rendering you can open up the page in maintenance mode.

  • Go to your broken web part page.
  • Add this to the end of your page’s URL string: ?contents=1
  • Press Enter.

The web part maintenance page will include a listing of all web parts currently configured as part of your page. Select the web part(s) that are broken and click Delete to remove them from your page.

 

Control available Pagelayouts and site templates for non-publishing sites

You can limit the site templates that are available to users even if the site is not a publishing site. By default, unless the site is a publishing site, the Pagelayouts and site templates options will not be available on the Site settings page.

However, by just adding /_layouts/15/AreaTemplateSettings.aspx to the end of the site url, you can get to the settings page and choose which site templates should be available to the users.

 

Upgrading to SharePoint 2013 Service Pack 1 (SP1)

Patching your SharePoint farm with the official Microsoft SharePoint service packs is a good praxis and is a pretty straight forward operation. As always, make sure you do a full farm backup before you start making major changes to your farm so that you can roll back if something goes wrong.

1. Download the service pack for SharePoint Server here or SharePoint Foundation here.
2. Copy the file to all SharePoint servers.
3. Install the file on all servers (can be done in parallel.)
4. Restart servers if requested by the installation script.
5. Run the SharePoint Products Configuration Wizard on each server in sequence. I started with our app server, but this may not be necessary.

NB! If you get an error when running the product configuration wizard after you have installed the service pack, make sure that only managed accounts have owner permission on the content database (could also be the case for the other SharePoint databases).

There is a good guide that goes through all the steps in the process here.

 

Add document set to existing library

Here is how you add a document set to an existing library and make the document set use the same metadata as the items in the library

-Open library settings

-In advanced settings, enable content types

-Under content types, click on Add from existing site content types

-Select Contenttypes for document set

-Select Document set

-Under Content types, click on Document set

-Under Columns, click on Add from existing

-Click on Settings for document set

-Click on Add from existing site and list columns

-Select List columns and add the existing columns for the list. Click OK.

-Click on Settings for document set

-Select which columns you want documents added to the document set to inherit from the document set. Click OK.

 

Editing SharePoint documents through Aventail VPN

We strugled for a long time with an error with editing SharePoint documents through an Aventail web proxy VPN connection.

It turned out that one of the accounts in Aventail had to be set to got to the root web application in SharePoint. As long as one account is set to the root site, other accounts can be set go to a sub site in the web application.