Saturday, 3 October 2020

Advantage & Limitations of SharePoint Online Modern Communication Site Footer

In our previous posts we have seen how can we enable Footer, How to add, edit remove footer logo and links and set up audience targeting in Footer links. If you have not gone through that you can use below links to checkout it out:

So Let's see what is Advantage & Limitations of the Modern Footer.

Limitations
  • OOTB footer is available for only Modern communication sites. For Modern Team sites, it is not available

    This is the biggest obstacle to use OOTB Footer. You can't have it in Modern Team site template. So if your site structure has even a single modern Team site, you need to build your own custom SPFx Footer.  

  • OOTB Footer will not be visible in mobile resolution
    I believe with digitalization all around the world, people use their tablet and mobile more than their laptop and desktop. And Modern footer is not available in that is second biggest flaw. 

  • OOTB Footer will not be visible in site content, List/ Libraries and in classic settings/Site pages like settings pages
    It is not visible in site content, list and libraries as well in Modern Communication Site. Also as these are modern feature, they will not visible in classic pages like site settings or classic site or publishing pages.

  • You can set Max 8 links/ Label in OOTB Footer except logo and footer display name
    8 Links - is very less limit. For simple layout footer we can see it will feasible but if you have extended footer layout, it looks very limited.

  • External user can not edit the footer even though you have given them full control rights
    I believe this is due to security concerns. 

  • You can not use SharePoint site groups for Audience targeting
    You need to use office 365 security groups or Modern team sites office 365 groups for the audience targeting. In this scenario, if you have just site collection admin rights, you are not able to do anything. In classic SharePoint, SharePoint groups were there. So I hope Microsoft might find a way to bring that back.

Advantage
  • Easy to configure
    The good thing is you don't need to know rocket science to configure this. Just enable a toggle button and add some links and you have a footer ready. 

    You are given a 2 types of layout to choose from. Also you can make changes in each site as per your requirement as all sites have their own footer.

  • End user or client can maintain this by themselves with minimal guidance
    This is toughest job as handover to client. You need to make sure once your work is done, anyone with given guideline can maintain things. And in compare to customized SPFx extension it will be less easy to train uses to use OOTB Footer

  • Does not occupy space on the page
    This is the best thing about that. OOTB footer append at the end of the page. Means you have full body visible. In custom SPFx, the footer will have its own part at the page. So the body content reading is an issue. See below images for example.
OOTB Footer




SPFx Extension


You can go with OOTB as well custom SPFx Footer as per your requirement. If you want to go with OOTB Footer, please convey the limitations to the end client first.

This is the end of our Footer Series. Let me know if you have any queries, then I will be happy to answer. 

Reference
  • https://docs.microsoft.com/en-us/sharepoint/dev/features/site-footer
  • https://support.microsoft.com/en-us/office/customize-the-navigation-on-your-sharepoint-site-3cd61ae7-a9ed-4e1e-bf6d-4655f0bf25ca?ui=en-us&rs=en-us&ad=us

Different Layout in SharePoint Online Modern Communication Site Footer

 In our previous posts we have seen how can we enable Footer, How to add, edit remove footer logo and links and set up audience targeting in Footer links. If you have not gone through that you can use below links to checkout it out:

So Let's see what are the layout options available in OOTB Footer and how to find this setting:

Follow below steps to check footer layout option:

  • Go to Setting -> Change the look -> Footer.
    (you can find steps in detail in first blog)


There are two types of footer layout available:
  • Simple
    In Simple layout the footer links will place in horizontal. See below screenshot for the reference:


  • Extended
    In Extended layout the footer links will place in in full width row. If the width of the link is extended, it will show in new row. See below screenshot for the reference:

You can use simple or extended layout as per your requirement. In both, you can use 8 links, Footer logo and text as per your requirement.

In next article, we will see the advantage and limitations of OOTB Footer.

Sunday, 13 September 2020

How to set up Audience Targeting in Footer links in Modern Communication Site?

In previous blogs we learn how can we enable footer, set logo and footer text and add & Edit footer links on SharePoint Online Modern Communication site. If you have not gone through that you can use below link to check that post.

In this blog, we are going to see how we can set audience targeting on the links. So, let's start with pre-requisites:

Pre-requisites:

We will need below things to set up audience targeting:
  • The site owner must enable audience targeting for site navigation.
    Only site owners can turn audience targeting on and off. Once turned on, any site editor can target menu links to specific audiences.
  • The Office 365 Admin user must set up Microsoft 365 groups and security groups.
    Currently Azure AD dynamic groups & SharePoint site groups are not currently supported. Though to overcome this, you can set up SharePoint Modern Teams sites with Office 365 groups and use that group in audience targeting.
Enable & Add Groups in Audience Targeting

Follow below steps to enable Audience Targeting:
  • Scroll to the bottom of the page.

  • Click on Edit.
    Note – If you do not see this, then you do not have enough permission.

  • It will open new panel in the left side of the screen.


  • Enable Site navigation audience targeting.
    Note - If you do not see this, then you do not have enough permission.


  • Once you enable this setting, you will see audience targeting text box while add, edit links.


  • When you start typing, it will provide auto suggest groups. For this blog, I am choosing one of my team site group for home link.


  • You can select up to 10 groups. 
  • Click Ok. 


  • Then you can see audience targeting icon beside the link.


  • Click save to save changes.


Note - While editing the navigation, all links and sub links become visible to the editor including those that are targeted. Once saved, the navigation will display to targeted users only. 

You can login with other user and check the link is hidden.




In next blog, we will check the layout options for the footer.

Thursday, 30 July 2020

How to add, edit and Remove Footer links in Modern communication site

In previous blogs we learn how can we enable footer and set logo and footer text on SharePoint Online Modern Communication site. If you have not gone through that you can use below link to check that post.


In this blog, we are going to see what are the options to add links. So let's get started.

Once you enable footer, you can see footer in the bottom of the footer.

Add Footer Links:
To add footer links, follow below steps:
  • Scroll to the bottom of the page.
  • Click on Edit.
    Note – If you do not see this, then you do not have enough permission.
  • It will open new panel in the left side of the screen.

  • If you want to display links to specific group, enable Site navigation audience targeting. We will discuss about this in detail in next blog

  • Click on “+” icon to add new link.
  • When you click “+” icon, it will open dialog besides it. You need to fill below values:
    • Choose whether you want to add link or label
      • If you select link, you can provide “Address”. In this you can specify URL where user will be redirect on click.

      • If you select label, address field is disabled.

    • Provide Display Name. 
    • Click OK.
  • Repeat above steps to add more links/ label. You can total 8 links. After 8 links add button will be disabled.

  • Click “Save” once all changes are done.
  • Refresh page to see result if you don't see changes after save click.

Edit Footer Links:
    To edit footer text, follow below steps:
    • Scroll to the bottom of the page. 
    • Click on Edit.
      Note – If you do not see this, then you do not have enough permission.

    • It will open new panel in the left side of the screen.
    • Click on “…” beside link / label. 
    • It provides multiple options like
      • Edit - It will provide option to edit
      • Move Up - It will move current link to one step up.
      • Move Down - It will move current link to one step down. 
      • Remove - It will remove the link

    • Click on Edit.
    • It will open edit link dialog. This will be same as we explain in add link.
    • Make changes and click OK.
    • Click Save.
    • Refresh page to see result if you don't see changes after save click

    Remove Footer Links:
    To remove footer text, follow below steps:
    • Scroll to the bottom of the page. 
    • Click on Edit.
      Note – If you do not see this, then you do not have enough permission.

    • It will open new panel in the left side of the screen.
    • Click on “…” beside link / label. It will provide multiple option. 
    • Click on remove.

    • Click Save.
    • Refresh page to see result if you don't see changes after save click.


    In next blog we will check out the audience targeting settings for the Footer links. 

    Monday, 27 July 2020

    How to set footer logo and footer text in Modern communication site

    In last blog we learn how can we enable footer on SharePoint Online Modern Communication site. If you have not gone through that you can use below link to check that post.

    In this blog, we are going to see what are the options to set logo and text. So let's get started.

    Follow below steps to set footer logo:

    • Go to Setting -> Change the look -> Footer.
      (you can find steps in detail in first blog)
    • There you can see upload logo option. Click upload. Select the file from your local system. 

    • Click save

    • It will be displayed to footer.

    To add footer text, follow below steps:
    • Go to Settings -> Change the look -> Footer
    • Add text in display name.

    • Click Save.
    • It will show in the left bottom corner.

    In next blog we will see how we can set footer links. What are layout option to show the links and what are the limitation of the Modern footer.

    Saturday, 25 July 2020

    How to enable Footer in a SharePoint Modern Communication Site

    SharePoint Online introduce Modern Sites and with it introduce OOTB Footer. Generally we are not used to it but one of our customer wanted to learn more about it and asked us to prepare document on it.

    We thought as it has been some time, we will get detailed blog on it easily. But it seems it is been described only in Microsoft Document. And I have put reference of it in the end of this post. It is good but it seems very less described and not updated with new updates. So I am trying to explain it in as detail as I can in this footer series. So lets get started.

    First of all we need to make sure the Footer is enabled in the Modern Communication SharePoint site.

    Notes -
    • Footer is not available in Modern Team site as of now.  
    • Footer will be enabled by default for all new communication sites after the feature is rolled out. If you can see the footer on your modern communication site, skip this steps
    Follow below steps to enable the Footer:
    • Click on “Settings”.
    • Click on “Change the look” option.
      Note – If you are not seeing this option then you do not have enough permission on this site.



    • Click on Footer

    • Make sure footer is enabled. If not enable it.

    • Once you enable, it will show different option. We will look in to them in next post. Click Save.

    • Once your enable it , it will display in the bottom of the page.


    You can enable this using PowerShell as well. For this you will need PNP Powershell installed in your system. In case you don't have PNP PowerShell Set up, check this blog.

    Below is PNP PowerShell command to enable footer:

    Connect-PnPOnline -Url "<SiteURL>" –Credentials (Get-Credential) 
    Set-PnPFooter -Enabled:$false

    Lets configure the footer in the next blog.

    Reference:
    https://docs.microsoft.com/en-us/sharepoint/dev/features/site-footer

    Wednesday, 1 April 2020

    Office 365/SharePoint Online - PowerShell Script to get Unique Visitors & Total Views count for Site Page

    Problem Statement -

    We have a client with a large SharePoint Tenant, want to know the Total Views count along with Unique Visitors count for each Post/Page, they are adding every day for their employees.

    Analysis -

    Currently, Microsoft is working on Analytics API that is supposed to give you the details regarding total view count and unique view count for specific item. Even though it is released but not working for a single item.

    The alternative way is to use the SharePoint Search API. This will use Microsoft Classic Search results and provide you count based on that.

    Resolution -

    We have decided to go with the SharePoint Search API approach. We have found an article with the same idea. The only concern was, using Search API directly can return max 500 rows as a result at a time. So, we need to generalize that script in such a way that it can be executed for all items in the list/library.

    So, here is generalized the Power-Shell script:

    Step 1 - Load required dependencies/assemblies:
    # Paths to SDK. Please verify location on your computer.  
     #Add-PSSnapin Microsoft.SharePoint.PowerShell  
     [System.Reflection.Assembly]::LoadFrom("C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll")  
     [System.Reflection.Assembly]::LoadFrom("C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll")  
     [System.Reflection.Assembly]::LoadFrom("C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Search.dll") 

    Step 2 - Create a Function - to get all list items and using search query to retrieve ViewsLifeTime & ViewsLifeTimeUniqueUsers for each item:
    function Get-SPOListView  
     {  
       param(  
       [Parameter(Mandatory=$true,Position=1)]  
       [string]$Username,  
       [Parameter(Mandatory=$true,Position=2)]  
       $AdminPassword,  
       [Parameter(Mandatory=$true,Position=3)]  
       [string]$Url,  
       [Parameter(Mandatory=$true,Position=4)]  
       [string]$ListTitle  
       [Parameter(Mandatory=$true,Position=5)]  
       [string]$TenantUrl  
       )  
      #Get the SharePoint List/Library.
       $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)  
       $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)  
       $ll=$ctx.Web.Lists.GetByTitle($ListTitle)  
       $ctx.load($ll)  
       $ctx.ExecuteQuery()  
      #Get all items from the List/Library.
       $qry = [Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery()  
       $items = $ll.GetItems($qry)   
       $ctx.Load($items)  
       $ctx.ExecuteQuery()  
       foreach($listItem in $items)  
       {  
         Write-Host "ID - " $listItem["ID"] "Title - " $listItem["Title"] "EncodedAbsUrl - " $listItem["FileRef"]     
         $fileurl = $TenantUrl+ $listItem["FileRef"]  
         #Using Search API - Create the instance of KeywordQuery and set the properties.
         $keywordQuery = New-Object Microsoft.SharePoint.Client.Search.Query.KeywordQuery($ctx)   
         #Sample Query - To get the result of last year.
         $queryText="Path:" + $fileurl  
         $keywordQuery.QueryText = $queryText  
         $keywordQuery.TrimDuplicates=$false  
         $keywordQuery.SelectProperties.Add("ViewsLifeTime")  
         $keywordQuery.SelectProperties.Add("ViewsLifeTimeUniqueUsers")  
         $keywordQuery.SortList.Add("ViewsLifeTime","Asc")   
         #Search API - Create the instance of SearchExecutor and get the result.
         $searchExecutor = New-Object Microsoft.SharePoint.Client.Search.Query.SearchExecutor($ctx)  
         $results = $searchExecutor.ExecuteQuery($keywordQuery)  
         $ctx.ExecuteQuery()  
         #Result Count  
         Write-Host $results.Value[0].ResultRows.Count  
         #CSV file location, to store the result  
         $exportlocation = "C:\Pages_ViewsCount - Copy.csv"  
         foreach($result in $results.Value[0].ResultRows)  
         {  
           $outputline='"'+$result["Title"]+'"'+","+'"'+$result["Path"]+'"'+","+$result["ViewsLifeTime"]+","+$result["ViewsLifeTimeUniqueUsers"]   
           Add-Content $exportlocation $outputline   
         }   
         #}  
       }  
     }

    Step 3 - Call the above function:
    # Insert the credentials along with Admin & Tenant URLs and Call above Function.  
     #Enter Username here  
     $Username="username@sharepoint.com"  
     #Enter Password Here  
     $Password=Read-Host -Prompt "Password" -AsSecureString  
     #URL of the site collection  
     $rootUrl= "Root Site collection URL"  
     $ListTitle= "Site Pages"  
     $TenantUrl= "Your tenant URL E.g. https://YourCompany.sharepoint.com"  
     Get-SPOListView -Username $Username -AdminPassword $Password -Url $rootUrl -ListTitle $ListTitle -TenantUrl $TenantUrl 

    It will export all items of the list with Total views count - ViewsLifeTime & Unique views count - ViewsLifeTimeUniqueUsers in excel sheet as shown in below image:


    In case you need the dll files, you can download from below link
    https://drive.google.com/file/d/1P9YzJUvCeAfnZ8xIr-7SKCN2fisbRP6a/view?usp=sharing

    References