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 BlogPostSearchResultsController : SitecoreController | |
{ | |
private readonly ISearchService _blogPostSearchService; | |
public BlogPostSearchResultsController(ISearchService BlogPostSearchService) | |
{ | |
_blogPostSearchService = BlogPostSearchService; | |
} | |
public ActionResult Results() |
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
@using Glass.Mapper.Sc.Web.Mvc | |
@using FluxDigital.Feature.Search.Models | |
@using PagedList.Mvc | |
@using Sitecore.Configuration | |
@model BlogPostSearchResultsModel | |
<div class="wrapper"> | |
<form class="search" action="" method="GET"> | |
<div class="search-box"> |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration | |
xmlns:patch="http://www.sitecore.net/xmlconfig/" | |
xmlns:role="http://www.sitecore.net/xmlconfig/role/" | |
xmlns:search="http://www.sitecore.net/xmlconfig/search/"> | |
<sitecore role:require="Standalone or ContentManagement or ContentDelivery" search:require="solr"> | |
<contentSearch> | |
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch"> | |
<indexes hint="list:AddIndex"> | |
<index id="sc93_blogs_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider"> |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration | |
xmlns:patch="http://www.sitecore.net/xmlconfig/" | |
xmlns:role="http://www.sitecore.net/xmlconfig/role/" | |
xmlns:search="http://www.sitecore.net/xmlconfig/search/"> | |
<sitecore role:require="Standalone or ContentManagement or ContentDelivery" search:require="solr"> | |
<contentSearch> | |
<indexConfigurations> | |
<blogPostSearchIndexConfiguration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration"> | |
<fieldMap ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap"> |
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
# Set the necessary parameters for the new item | |
$itemName = "My New Item" | |
$itemTemplate = "{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}" #Sample Item | |
$parentItemPath = "/sitecore/content/Home" | |
# Create the new item | |
$newItem = New-Item -ItemType $itemTemplate -Name $itemName -Path $parentItemPath | |
# Set the new item's field values | |
$newItem.Editing.BeginEdit() |
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
# Set the username of the user whose locked items you want to unlock | |
$username = "admin" | |
# Get a list of all items locked by the specified user | |
$lockedItems = Get-ChildItem -Path "master:\" -Recurse | Where-Object { | |
$_.Locking.IsLocked -and $_.Locking.LockedBy -eq $username | |
} | |
# Unlock all items in the list | |
foreach ($item in $lockedItems) { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> | |
<sitecore> | |
<services> | |
<configurator type="FluxiDigtal.Foundation.DependencyInjection.MvcControllerServicesConfigurator, FluxiDigtal.Foundation.DependencyInjection"> | |
<!--turn on option on CD--> | |
<param desc="useMyCustomCache" role:require="ContentDelivery">true</param> | |
</configurator> | |
</services> | |
</sitecore> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<services> | |
<configurator type="FluxiDigtal.Foundation.DependencyInjection.ServicesConfigurator, FluxiDigtal.Foundation.DependencyInjection"> | |
</configurator> | |
</services> | |
</sitecore> | |
</configuration> |
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
#*** converts an Publish.xml file to the new Sitecore CLI Json format *** | |
#helper functions | |
function CheckNamePart($namePart){ | |
$namePart = $namePart.Replace(' ','') | |
$namePart = $namePart.Replace('{','') | |
$namePart = $namePart.Replace('}','') | |
return $namePart | |
} |
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
### Adds IAR Check and message to Content Editor ### | |
#IARs method for GetItemLocations() are only available in 10.2 an above - so return if Sitecore 9 -> 10.1 | |
$sitecoreversion = [Sitecore.Configuration.About]::Version | |
if ($sitecoreversion.StartsWith('9') -or $sitecoreversion.StartsWith('10.0') -or $sitecoreversion.StartsWith('10.1')) | |
{ | |
#Sorry this is only for Sitecore 10.2+ and XMCloud | |
exit | |
} |