Tag Archives: Libraries

Libraries

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