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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<log4net> | |
<appender name="ADONetAppender_SqlServer" type="log4net.Appender.ADONetAppender, Sitecore.Logging"> | |
<bufferSize value="1" /> | |
<param name="ConnectionType" value="System.Data.SqlClient.SqlConnection, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | |
<param name="ConnectionString" value="user id=[userName];password=[password];Data Source=[ServerName];Database=Sitecore.Logging" /> | |
<param name="CommandText" value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)" /> | |
<param name="Parameter"> |
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
<Settings> | |
<Sitecore> | |
<Publishing> | |
<ConnectionStrings> | |
<Master>user id={userId};password={Password};Data Source={Datasource};Database=SitecoreExperimentalLab_Master;MultipleActiveResultSets=True;</Master> | |
<Web>user id={userId};password={Password};Data Source={Datasource};Database=SitecoreExperimentalLab_Web;MultipleActiveResultSets=True;</Web> | |
<Core>user id={userId};password={Password};Data Source={Datasource};Database=SitecoreExperimentalLab_Core;MultipleActiveResultSets=True;</Core> | |
</ConnectionStrings> | |
</Publishing> | |
</Sitecore> |
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
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<settings> | |
<!-- Example: <setting name="PublishingServiceUrlRoot">http://local.publishingservice.com/</setting> --> | |
<setting name="PublishingServiceUrlRoot">http://{your site url here}/</setting> | |
</settings> | |
</sitecore> | |
</configuration> |
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
$templateItem = Get-Item -Path "master:\templates" | |
$props = @{ | |
Parameters = @( | |
@{ Name = "userInput"; Title = "User Input"; Tab = "General" }, | |
@{ Name = "templateItem"; Title = "Start Item"; Root = "/sitecore/Templates/"; Tab = "General" } | |
) | |
Title = "Powershell Demo" | |
OkButtonName = "Proceed" | |
CancelButtonName = "Abort" |
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 Demo | |
{ | |
public bool GetResponse(string userInput, Item templateItem) | |
{ | |
//Perform the different logic here | |
... | |
... | |
return response | |
} |
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
<sitecore> | |
<loggedin> | |
<processor mode="on" type="YourNamespace.YourClass, YourAssembly" /> | |
</loggedin> | |
</sitecore> |
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 EnforceEntireTree | |
{ | |
public void Process(LoggedInArgs args) | |
{ | |
User user = User.FromName(args.Username, true); | |
Assert.IsNotNull(user, "user"); | |
string key = "/" + user.Name + "/UserOptions.View.ShowEntireTree"; | |
user.Profile.Initialize(user.Name, true); | |
user.Profile[key] = "true"; |
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 (Speak) { | |
Speak.pageCode(["sitecore", "jquery", "arcwaveUtils"], function (sitecore, $, Utils) { | |
return { | |
initialized: function () { | |
// your code for initialized | |
}, | |
triggerSiteCreator: function () { |
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
[HttpGet] | |
public ActionResult SiteCreator() | |
{ | |
var shellSite = SiteContext.GetSite("shell"); | |
using (new SiteContextSwitcher(shellSite)) | |
{ | |
var urlString = new UrlString(UIUtil.GetUri("control:PowerShellRunner")); | |
urlString.Append("scriptId", "My SPE Script Id"); | |
urlString.Append("scriptDb", "master"); |
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
$scriptPath = "master:\system\Modules\PowerShell\Script Library\Experimental\Item Delete" | |
Start-ScriptSession -Path $scriptPath -Interactive -AutoDispose |
OlderNewer