Breadcrumbs for SharePoint 2013

By default SharePoint 2013 doesn’t have breadcrumbs which was a useful feature to navigate back in your SharePoint site. Luckily, this feature hasn’t been removed, instead this has been hidden within the master page. To activate this, follow the steps below.

  1. Within SharePoint Designer navigate to the Master Pages section.
  2. Right click the seattle.master master page and copy, paste this in the open space below to create a new master page then rename this.
    breadcrumbs2
  3. Right click your new master page and edit in advanced mode. Press Ctrl F and find ‘breadcrumb’, following the highlighted parts in the screenshot below, delete the  – style=”display:none;” and change the Visible=”false” to true, your results should look like the second screenshot below.
    breadcrumbscodebreadcrumbscode2
  4. Lastly, add the code below just before the closing </div>
    <script type=”text/javascript”>

    document.getElementById(“GlobalBreadCrumbNavPopout-anchor”).innerHTML='<img style=”border-width:0;position:absolute;left:-215px !important;top:-120px !important;” alt=”Navigate Up” src=”/_layouts/15/images/spcommon.png?rev=27″>’;

    </script>
    breadcrumbscode3

If however you have the Site Collection Feature ‘SharePoint Server Publishing Infrastructure’ and site feature ‘SharePoint Server Publishing’ activated, you will need to make these changes to the html version instead.

Modifying New Item form to delete/rearrange columns

Another request I’ve had is to hide columns on the new item form which in my case required the use of SharePoint Designer again. Details below.

  1. Within SharePoint Designer navigate to your list, create a new item form and edit in advanced mode (right click to edit in advanced mode).
    editformeditinadvancedmode
  2. Search for your column name and highlight the code within the <tr></tr>, this can then be re-arranged in order or deleted as per the below, save the form and preview in browser.
    newformremovecolumn

Promoted Links – Change amount per row and next page icon

While testing promoted links I came across an issue whereby I had too many links on a row and was displaying an arrow to view the rest of the icons which looked fairly awful. A way around this was to use a Script Editor WebPart to modify the page layout through CSS.

  1. On the page displaying the Promoted Links, click the cog and go edit page.
  2. Add the Script Editor WebPart which can be found under ‘Media and Content’.
  3. On the right side of the Script Editor WebPart you will see ‘EDIT SNIPPET’, click this and insert the code below into it.
    The first part of the code limits the amount of links per row, each tile has a default of 160px, so depending on the amount per row its 160*… The second part hides the arrows if there’s more items that you are currently unable to see.

    <style>
    /*display rows of 6 items*/
    .ms-promlink-body {
    width: 960px;
    }
    </style>

    <style>
    /*hide the arrows when you have more items than viewable*/
    .ms-promlink-header{
    display:none;
    }
    </style>

Prevent users from editing a column

A recent request I had was to prevent users from editing a column once the item had been created. This had to be done in SharePoint Designer, sure you can get around this with the quick edit option in SharePoint however, in my list quick edit was turned off to prevent this.

  1. Open SharePoint Designer and navigate to the list, create a new edit form and edit in advanced mode.
  2. Look for your column name and find the control mode within the SharePoint:FormField line. You will notice the ControlMode is usually set to ControlMode=”Edit”, change this to ControlMode=”Display”, save the form and check SharePoint for the results.<td width=”400px” valign=”top” class=”ms-formbody”>
    <SharePoint:FormField runat=”server” id=”ff6{$Pos}” ControlMode=”Display” FieldName=”DueDate” __designer:bind=”{ddwrt:DataBind(‘u’,concat(‘ff6′,$Pos),’Value’,’ValueChanged’,’ID’,ddwrt:EscapeDelims(string(@ID)),’@DueDate’)}”/>
    <SharePoint:FieldDescription runat=”server” id=”ff6description{$Pos}” FieldName=”DueDate” ControlMode=”Edit”/>
    </td>

    The end result is shown below, this is the edit form in SharePoint.
    DueDate

Hide Lists or Libraries from Site Contents page

In the Site Contents page, there can be many lists, libraries or other apps. While searching for a specific item this can be difficult if there are over 50 apps on the screen, some lists may just be used for back end results such as look-ups. So hiding lists and libraries that aren’t being used is simple, alternatively you could just Ctrl F the page and search your for your list. This change requires SharePoint Designer.

  1. Open SharePoint Designer and navigate to your list or library. On the information page, under settings is a tick box for “Hide from browser”, once ticked this will no longer show in SharePoint.
    HideFromBrowser

    Unfortunately, if you are wanting to unhide this, it will no longer display in the lists and libraries in SharePoint Designer (SPD). You will be required to go to the ‘All Files’ object and choose lists, this will then show the list that’s hidden. Find your list, right click and go properties, then remove the check box to hide the list.

Modifying the Ellipses

Within SharePoint the ellipses is used on the title column which is standard out of the box, unfortunately in my scenario the title column wasn’t being used and therefore, needed to transfer the ellipses to another column. This requires SharePoint Designer to change the column to what you want.

  1. Within SharePoint Designer, navigate to the list or library of your choice, in my case I’ve chosen a list. Within the list, choose a view to modify (usually the default view), right click the view and choose “Edit File in Advanced Mode”.
  2. Search for “<View Name=“, this is usually the longest line towards the bottom of the code. Find the part which states <FieldRef Name=”Your-Column-Name” /> and add ListItemMenu=”TRUE”. The end result should look like the below.
    ListItemMenuCode
    When you check the result in SharePoint, the ellipses will now be showing on your new column.
    HighMediumLowEndResult