This file contains 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
<# | |
You can use this script as reporting tool by using Forms Data Viewer | |
- [Forms Data Viewer - Sitecore Marketplace](https://marketplace.sitecore.net/Modules/F/Forms_Data_Viewer.aspx) | |
#> | |
$result = Read-Variable -Parameters ` | |
@{Name='formItem'; Title='Form'; Editor='droptree'; Source="DataSource=/sitecore/Forms"}, | |
@{Name='startDate'; Title='Start date'; Editor='date'}, | |
@{Name='endDate'; Title='End date'; Editor='date'} |
This file contains 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
$obj = [PSCustomObject]@{ | |
Foo = "foo value" | |
Bar = "bar value" | |
Baz = "baz value" | |
} | |
$hogeProp = @{ | |
Name = "Hoge" | |
Expression = { | |
return $_.Foo |
This file contains 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
#Requires -RunAsAdministrator | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string] | |
$SitePrefix, | |
[Parameter(Mandatory=$false)] | |
[string] | |
$LicensePath = "$PSScriptRoot/license.xml", | |
[switch] | |
$WhatIf |
This file contains 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
import React from 'react'; | |
import { Query } from 'react-apollo'; | |
import { | |
withSitecoreContext, | |
resetExperienceEditorChromes | |
} from '@sitecore-jss/sitecore-jss-react'; | |
class GqlQuery extends React.Component { | |
render() { | |
const { query, sitecoreContext, rendering } = this.props; |
This file contains 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 Get-HtmlContent($url) | |
{ | |
Invoke-WebRequest $url ` | |
| select -ExpandProperty Content ` | |
| % {$_.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries)} | |
} | |
$html1 = Get-HtmlContent "https://foo.example.com" | |
$html2 = Get-HtmlContent "https://bar.example.com" |
This file contains 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
#Requires -RunAsAdministrator | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string] | |
$SitePrefix, | |
[Parameter(Mandatory=$true)] | |
[string] | |
$PfxFileOrThumbprint | |
) |
This file contains 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
$resultTypes = [ordered]@{ | |
"Show all" = 1 | |
"Only matched" = 2 | |
"Only unmatched" = 4 | |
} | |
function Get-ItemTitle { | |
param ( | |
[Sitecore.Data.Items.Item]$Item | |
) |
This file contains 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
$readVariableParams = @{ | |
Parameters = @( | |
@{Name="root"; Title="Root item"; Editor="droptree"; } | |
@{Name="template"; Title="Template"; Editor="droptree"; Source="DataSource=/sitecore/templates" } | |
@{Name="fieldname"; Title="Field name" } | |
) | |
Title = "Search Edited Items" | |
Description = "Search items with non-default value in the field." | |
} |
This file contains 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 following section to your web.config --> | |
<httpErrors errorMode="Custom" existingResponse="Replace"> | |
<remove statusCode="404" subStatusCode="-1" /> | |
<remove statusCode="500" subStatusCode="-1" /> | |
<remove statusCode="501" subStatusCode="-1" /> | |
<remove statusCode="502" subStatusCode="-1" /> | |
<!-- Response the not found page (without changing a URL) --> | |
<error statusCode="404" prefixLanguageFilePath="" path="/notfound" responseMode="ExecuteURL"/> | |
<!-- Redirect to the static error page --> | |
<error statusCode="500" prefixLanguageFilePath="" path="/error.html" responseMode="Redirect"/> |
This file contains 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 CustomDocumentBuilder : SolrDocumentBuilder | |
{ | |
public CustomDocumentBuilder(IIndexable indexable, IProviderUpdateContext context) : base(indexable, context) | |
{ | |
} | |
protected override IEnumerable<IIndexableDataField> GetFieldsByItemList(IIndexable indexable) | |
{ | |
var fields = base.GetFieldsByItemList(indexable); |
OlderNewer