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
| { | |
| "sitecore": { | |
| "context": { | |
| "pageEditing": false, | |
| "language": "en", | |
| "site": { "name": "my-site" } | |
| }, | |
| "route": { | |
| "name": "home", | |
| "fields": { |
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 cacheDuration = Sitecore.Configuration.Settings.GetTimeSpanSetting("MyProject.Cache.Duration", TimeSpan.FromMinutes(30)); |
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
| <!-- App_Config/Include/Project/Z.Project.Environment.config --> | |
| <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" | |
| xmlns:role="http://www.sitecore.net/xmlconfig/role/" | |
| xmlns:env="http://www.sitecore.net/xmlconfig/env/"> | |
| <sitecore> | |
| <settings> | |
| <!-- Applies to every CD server, regardless of environment --> | |
| <setting name="MyProject.Analytics.Enabled" value="true" | |
| role:require="ContentDelivery" /> |
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
| <configSections> | |
| <section name="sitecore" type="Sitecore.Configuration.RuleBasedConfigReader, Sitecore.Kernel" /> | |
| </configSections> | |
| <sitecore configSource="App_Config\Sitecore.config" /> |
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
| <!-- web.config on a CD server in the DEV environment --> | |
| <appSettings> | |
| <add key="role:define" value="ContentDelivery" /> | |
| <add key="env:define" value="DEV" /> | |
| </appSettings> |
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
| <setting name="MyFeature.CacheEnabled" value="true" role:require="ContentDelivery" /> |
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
| <!-- web.config on a Content Delivery server --> | |
| <appSettings> | |
| <add key="role:define" value="ContentDelivery" /> | |
| </appSettings> |
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
| curl -I https://yoursite.com/~/media/Documents/Factsheet.ashx |
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
| private void SetAttachmentDisposition(HttpResponse response, string name, string extension) | |
| { | |
| string filename = $"{name}.{extension}"; | |
| string encoded = Uri.EscapeDataString(filename); | |
| response.Headers["Content-Disposition"] = $"attachment; filename=\"{filename}\"; filename*=UTF-8''{encoded}"; | |
| } |
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" encoding="utf-8" ?> | |
| <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
| <sitecore> | |
| <mediaLibrary> | |
| <mediaProvider type="MyProject.Foundation.Media.CustomMediaProvider, MyProject.Foundation.Media" patch:instead="*[@type='Sitecore.Resources.Media.MediaProvider, Sitecore.Kernel']" /> | |
| </mediaLibrary> | |
| </sitecore> | |
| </configuration> |
NewerOlder