This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration name="Shared" description="Shared Unicorn Config"> | |
<predicate> | |
<include name="SharedPageLayouts" database="master" path="/sitecore/layout/Layouts/Shared" /> | |
<include name="SharedTemplates" database="master" path="/sitecore/templates/Shared" /> | |
<include name="SharedNavigation" database="master" path="/sitecore/content/Shared/Navigation" fieldTransforms="-Home Link"> | |
</predicate> | |
<!--exclude the Navigation 'Home Link' field--> | |
<fieldFilter type="Rainbow.Filtering.ConfigurationFieldFilter, Rainbow"> | |
<exclude fieldID="{A2B16B7789-7A0B-4FE6-94FD-66A9E6F8BD08}" note="'Home Link' field on the Navigation template" key="HomeLink" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void SwitchPrimaryIndex(string indexName, string machineName, bool isCd) | |
{ | |
//get key | |
var indexKey = GetIndexKey(indexName, machineName, isCd); | |
//get current primary key name | |
var currentPrimaryIndexName = database.Properties[indexKey]; | |
//default to this as new index name | |
var newPrimaryIndexName = currentPrimaryIndexName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
$solrVersion = "7.2.1", | |
$installFolder = "C:\solr", | |
$solrPort = "8983", | |
$solrHost = "solr-910", | |
$solrSSL = $true, | |
$nssmVersion = "2.24", | |
$JREVersion = "9.0.1" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Swap-DataSource ($item, $renderingToUpdate, $renderingDataSourceIdToAdd, $useFinalLayout) { | |
$renderingItem = Get-Item -Path $renderingToUpdate.ItemID | |
Write-Host "Swaping Rendering Datasource: $($renderingId.UniqueID) - '$($renderingItem.Name)' to: $($renderingDataSourceIdToAdd) for Item: $($item.Name)" | |
$renderingToUpdate.Datasource = $renderingDataSourceToAdd | |
Set-Rendering -Item $item -Instance $renderingToUpdate -FinalLayout:$useFinalLayout | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Swap-Rendering ($item, $renderingToSwapOut, $placeholder, $renderingIdToAdd, $renderingDataSourceIdToAdd, $useFinalLayout) { | |
$renderingItem = Get-Item -Path $renderingToSwapOut.ItemID | |
Write-Host "Swaping Rendering: $($renderingToSwapOut.UniqueID) - '$($renderingItem.Name)' in Placeholder: $($placeholder) to: $($renderingIdToAdd) - '$($renderingToAdd.Name)' for Item: $($item.Name)" | |
$renderingToSwapOut.ItemID = $renderingIdToAdd | |
if($renderingDataSourceToAdd){ | |
$renderingToSwapOut.Datasource = $renderingDataSourceToAdd | |
} | |
Set-Rendering -Item $item -Instance $renderingToSwapOut -FinalLayout:$useFinalLayout | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomDropDownListField : DropListField | |
{ | |
public CustomDropDownListField() | |
{ | |
//initalise services here | |
} | |
private string InitialSelection { get; set; } | |
public override void Initialize() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomDropDownList : DropList | |
{ | |
private static readonly string BaseCssClassName = "scfCustomlistBorder"; | |
[ParameterName("emptychoicetext")] | |
[VisualCategory("Custom")] | |
[VisualProperty("Empty Choice Text:")] | |
public string EmptyChoiceText { get; set; } | |
[ParameterName("showemptychoice")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rootItem = Get-Item -Path "/sitecore/templates/Site1/Pages" #update to the path with your page templates | |
$deviceLayout = Get-LayoutDevice "Default" #update to device layout you wish to target | |
$templateMode = $True #set to False to update pages instead of templates (usually you will want to update template standard values) | |
$useFinalLayout = $False #set to True to use FinalRenderings instead of Renderings field | |
$checkForLayout = $False #set to True to skip items with no layout (use only for updating pages and not templates) | |
$updateDataSourcesOnly = $False #set to True to only update datasources and not swap or delete renderings | |
$reportMode = $False #set to True to just output info on renderings to be swapped/deleted/updated | |
$modeType = "" | |
$placeholder = "main" #update to use the placeholder your renderings exist in | |
$renderingIdToSwap = "{15BCE4DA-4F3C-42CA-9D4D-D46D572C7A8F}" #update to the rendering id you wish to swap out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TcPostBase | |
{ | |
public string Id { get; set; } | |
public string ContentId { get; set; } | |
public string ContentTypeId { get; set; } | |
public string Url { get; set; } | |
public string Excerpt { get; set; } | |
public string Body { get; set; } | |
public string GroupId { get; set; } | |
public string IsFeatured { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TcBlogPost : TcPostBase | |
{ | |
public string Slug { get; set; } | |
public string Title { get; set; } | |
public string TitleUrl { get; set; } | |
public string PublishedDate { get; set; } | |
public string ExcerptSize { get; set; } | |
public string UsePostSummary { get; set; } | |
public string GeneratePostSummary { get; set; } | |
public string BlogId { get; set; } |