Share via


How can we create multiple views of tiles view in promoted links list

Question: How can we create multiple views of tiles view in promoted links list? SharePoint will not allow you to create new tiles view in promoted links list by default.

Solution:

Use PowerShell script to create new view of tiles in promoted links list. For example, creating new tiles view of alerts, notification links etc., 

Sample promoted links data:

 Promoted Link  Category  another columns goes here ....
 Link1  Alert  
 Link2  Notification  
 Link3  Alert  
 Link4  Alert  
 Link5  Notification  

Change the web url and promoted links list values before you use the script.

if you want to apply different filter or different columns change the $query condition, for ex, applied where condition on Category field.

$web = Get-SPWeb https://shareopintsite.com/
 Write-Host "Connected to web " $web.URL;
 $lst  = $web.Lists["PromotedLinks List"]
 Write-Host "Connected to List" $lst.Title;
 
Function copyView($categoryName)
{
  $defaultView = $lst.DefaultView;
  $defaultView = $defaultView.Clone($categoryName, 100, $true, $false);
  $query = "<OrderBy><FieldRef Name='TileOrder' Ascending='TRUE' /><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy><Where><Eq><FieldRef Name='Category' /><Value Type='Text'>" + $categoryName +"</Value></Eq></Where>";
  $defaultView.Query = $query;
  $defaultView.Update();
  Write-Host "Created view successfully" $categoryName;
  Write-Host;
}
 
Write-Host "Creating view of Alert";
copyView "Alert";
 
Write-Host "Creating view of Notification";
copyView "Notification";
 
$lst.update();

Alert and Notification tiles views will be created after the script run.

Now you have different views, you can extend this to show alert and notification views in one page.

Ex: