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
# Add the Sitecore MyGet repository to PowerShell | |
Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2 | |
# Install the Sitecore Install Framwork module | |
Install-Module SitecoreInstallFramework | |
# Install the Sitecore Fundamentals module (provides additional functionality for local installations like creating self-signed certificates) | |
Install-Module SitecoreFundamentals | |
# Import the modules into your current PowerShell context (if necessary) |
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
#define parameters | |
$prefix = "sc91" | |
$PSScriptRoot = “C:\Sitecore9-Install\resources” | |
$XConnectCollectionService = "$prefix.xconnect" | |
$sitecoreSiteName = "$prefix.local" | |
$SolrUrl = "https://solr-sc9:8983/solr" | |
$SolrRoot = "C:\Solr\solr-6.6.2" | |
$SolrService = "Solr-6.6.2" | |
$SqlServer = "./" | |
$SqlAdminUser = "sa" |
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
namespace FluxDigital.Sitecore.Extensions.Fields | |
{ | |
public abstract class BaseExternalMultiList : MultilistEx | |
{ | |
private string _itemCountsjs = ""; | |
/// <summary> | |
/// Return here your unselected items. First value is the ID you will store into your field, the second one is the display text. | |
/// </summary> | |
/// <returns>The unselected items</returns> |
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
namespace FluxDigital.Sitecore.Extensions.Fields | |
{ | |
public class CryptoMultilist : BaseExternalMultiList | |
{ | |
private List<CryptoCoin> _coinList; | |
protected override void InitRendering() | |
{ | |
CryptoService cryptoService = new CryptoService(); | |
_coinList = cryptoService.CointList(); |
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
namespace FluxDigital.Sitecore.Extensions.Services | |
{ | |
public class CryptoService | |
{ | |
public List<CryptoCoin> CointList() | |
{ | |
List<CryptoCoin> coinList = new List<CryptoCoin>(); | |
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("https://www.cryptocompare.com/api/data/coinlist/"); | |
httpWebRequest.ContentType = "application/json"; | |
httpWebRequest.Method = "GET"; |
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
namespace FluxDigital.Sitecore.Extensions.Models | |
{ | |
public class RootCryptoResponse | |
{ | |
public string Response { get; set; } | |
public string Message { get; set; } | |
public string BaseImageUrl { get; set; } | |
public string BaseLinkUrl { get; set; } | |
[JsonProperty("Data")] |
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
namespace FluxDigital.Sitecore.Extensions.Models | |
{ | |
public class CryptoCoin | |
{ | |
public string Id { get; set; } | |
public string CoinName { get; set; } | |
public string Name { get; set; } | |
public string FullName { get; set; } | |
public string Symbol { get; set; } | |
public string Url { 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
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> | |
<sitecore> | |
<contentSearch> | |
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch"> | |
<indexes hint="list:AddIndex"> | |
<!--add other indexes to disable here--> | |
<index id="sitecore_core_index"> | |
<strategies hint="list:AddStrategy"> | |
<strategy set:ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" /> | |
</strategies> |
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
<# | |
.SYNOPSIS | |
Updates the data template of an item (and optionally it's child items) from one template to another | |
.PARAMETER RootItemId | |
Specifies an Item Id to start searching for items from | |
.PARAMETER SourceTemplateId | |
Specifies the Id of the template to match items on (the template you wish to change) | |
.PARAMETER TargetTemplateId | |
Specifies the Id of the template to change items to | |
.PARAMETER Recurse |
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 TcDemo.Models.TcBlogPost; | |
public class BlogPostListController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
var host = new TelligentRestHost("http://tcdemo.local.com", "testuser", "5h4qg4basasgssdpglyt5sjtkw44u3", false, 10, null); | |
restGetOptions = new RestGetOptions() | |
{ | |
QueryStringParameters = | |
{ |
OlderNewer