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"?> | |
| <configuration> | |
| <sitecore> | |
| <pipelines> | |
| <initialize> | |
| <processor type="Website.SetupIoc, Website" /> | |
| </initialize> | |
| </pipelines> | |
| </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
| using System.Diagnostics; | |
| using System.Web; | |
| using Sitecore.Mvc.Pipelines.Response.RenderRendering; | |
| namespace Website.Pipelines.RenderRendering | |
| { | |
| public class PerformanceMeasurementProcessorBegin : RenderRenderingProcessor | |
| { | |
| public override void Process(RenderRenderingArgs args) | |
| { |
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 virtual HtmlString RenderItem(Item item, string controller, string action) | |
| { | |
| Assert.ArgumentNotNull(item, "item"); | |
| Assert.ArgumentNotNullOrEmpty(controller, "controller"); | |
| Assert.ArgumentNotNullOrEmpty(action, "action"); | |
| var r = new Rendering(); | |
| r.DataSource = item.Paths.FullPath; | |
| using (RenderingContext.EnterContext(r)) | |
| { |
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 System.Web.Mvc; | |
| using Castle.Windsor; | |
| using Sitecore.Mvc.Controllers; | |
| using Sitecore.Mvc.Pipelines.Loader; | |
| using Sitecore.Pipelines; | |
| using Interfaces.Managers.Windsor; | |
| using ControllerBuilder = System.Web.Mvc.ControllerBuilder; | |
| namespace Website | |
| { |
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 virtual Tuple<string, string> GetAdaptiveImageUrls(Item item, string imageFieldName, int maxWidth = 300) | |
| { | |
| Assert.IsNotNull(item, nameof(item)); | |
| Assert.IsNotNullOrEmpty(imageFieldName, nameof(imageFieldName)); | |
| ImageField imageField = item.Fields[imageFieldName]; | |
| if (imageField?.MediaItem != null /*&& imageField.MediaItem.Versions.Count > 0*/) | |
| { | |
| string imageUrl = HashingUtils.ProtectAssetUrl(MediaManager.GetMediaUrl(imageField.MediaItem, new MediaUrlOptions {MaxWidth = maxWidth})); |
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
| Param( | |
| $installFolder = "c:\solr", | |
| $solrPort = "8721", | |
| $solrHost = "solr", | |
| $solrSSL = $true, | |
| $downloadFolder = "$PSScriptRoot" | |
| ) | |
| $solrVersion = "7.2.1" | |
| $solrName = "solr-$solrVersion" |
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
| module.exports = function () { | |
| var config = { | |
| websiteRoot: "C:\\inetpub\\wwwroot\\sc911.sc", | |
| sitecoreLibraries: "C:\\inetpub\\wwwroot\\sc911.sc\\bin", | |
| hostName: "http://sc911.sc", | |
| solutionName: "sc911", | |
| buildConfiguration: "Debug", | |
| runCleanBuilds: false, | |
| toolsVersion: "16.0" | |
| } |
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
| var rename = require('gulp-rename'); | |
| var replace = require('gulp-replace'); | |
| ... | |
| gulp.task("B04-Sync-Unicorn", | |
| function(callback) { | |
| console.log("Executing Unicorn Sync"); | |
| gulp.src([path.resolve(config.websiteRoot + '/App_Config/Include/zzz/Unicorn.TargetDataStore.config.EDITME')]) |
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
| How to set up Unicorn in your Docker container | |
| Since all writing to Unicorn files happens inside the container, and the container is now linked to .\unicorn, | |
| all you need to do is ensure that .\unicorn is included under source control. | |
| This gets even better if you use Transparent Sync. |
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 your VM as normal, get Windows installed and so on | |
| - Power the VM down, to "Off" state | |
| - On the HOST pc, execute the following 2 commands from an elevated Powershell prompt | |
| Set-VMProcessor -VMName "Name of your VM" -ExposeVirtualizationExtensions $true | |
| Get-VMNetworkAdapter -VMName "Name of your VM" | Set-VMNetworkAdapter -MacAddressSpoofing On | |
| - Start up the VM again | |
| - Inside the VM, execute the following command from an elevated Powershell prompt |
OlderNewer