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 captcha to any form that doesn't have one already | |
$formsRootPath = "master:/sitecore/content/Wbsite1/forms/test" | |
$wffmFormTemplateId = "{FFB1DA32-2764-47DB-83B0-95B843546A7E}" | |
$wffmFieldTemplateId = "{C9E1BF85-800A-4247-A3A3-C3F5DFBFD6AA}" | |
$captchaFieldTemplateId = "{7FB270BE-FEFC-49C3-8CB4-947878C099E5}" | |
$captchaFieldName = "I'm not a Robot" | |
$captchFieldSortOrder = 1000 | |
$updatedCount = 0 | |
Write-Host "Getting List of Forms to add Captchas to from: $($formsRootPath)..." |
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
New-Item -Path "master:\content\home" -Name "Item With Forced ID" -ItemType "Sample/Sample Item" -ForceId "777f5e27-bbb2-462b-a3bc-8e170e84649d" | |
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
# Create Package & Set Properties | |
$package = new-package "Test Pages & Components"; | |
$package.Sources.Clear(); | |
$package.Metadata.Author = "aseabridge"; | |
$package.Metadata.Publisher = "Flux Digital"; | |
$package.Metadata.Version = "1.0"; | |
$package.Metadata.Readme = 'This package contains number of test pages and components'; | |
Write-Host "Creating Test Pages & Components Package..." |
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 void Execute(IJobExecutionContext context) | |
{ | |
//get details of Job | |
JobDataMap dataMap = context.JobDetail.JobDataMap; | |
string itemId = dataMap.GetString(SitecronConstants.FieldNames.ItemID); | |
Database masterDb = Sitecore.Configuration.Factory.GetDatabase("master"); | |
Item jobItem = masterDb.GetItem(new ID(itemId)); | |
try | |
{ |
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
@inherits MyWebsite.Models.ITable | |
@{ | |
var tableRowsToSkip = 0; | |
if (DataSource.HasHeaderRow) | |
{ | |
tableRowsToSkip = 1; | |
} | |
var tableRowsToRemove = 1; | |
if (DataSource.HasFooterRow && DataSource.HasHeaderRow) |
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 interface ITable : ISitecoreItem | |
{ | |
bool HasHeaderRow { get; set; } | |
bool HasFooterRow { get; set; } | |
IEnumerable<ITableRow> TableRows { get; set; } | |
} | |
public interface ITableRow : ISitecoreItem | |
{ | |
IEnumerable<ITableCell> TableCells { 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
class AddTableRows : WebEdit | |
{ | |
private string RowsToAdd { get; set; } | |
public override void Execute(CommandContext context) | |
{ | |
Assert.ArgumentNotNull((object)context, nameof(context)); | |
ItemUri queryString = ItemUri.ParseQueryString(); | |
if (queryString != (ItemUri)null) | |
{ | |
Item obj = Database.GetItem(queryString); |
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="Foundation.SiteCron" | |
description="SiteCron definition items" | |
dependencies="Foundation.Serialization" | |
patch:after="configuration[@name='Foundation.Serialization']" | |
extends="Helix.Foundation"> | |
<predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true"> | |
<include name="ModulesTemplatesSitecron" database="master" path="/sitecore/templates/Modules/Sitecron" /> | |
<include name="SystemSitecron" database="master" path="/sitecore/system/Modules/Sitecron"> | |
<exclude childrenOfPath="OOTB/SiteCron Execution Reports" /> |