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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Web.UI; | |
using Sitecore; | |
using Sitecore.Data.Items; | |
using Sitecore.Diagnostics; | |
using Sitecore.Shell.Applications.Dialogs.ItemLister; | |
using Sitecore.Web.UI.HtmlControls; |
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" ?> | |
<control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense"> | |
<Sitecore.Shell.Applications.Dialogs.SelectRendering> | |
<FormDialog ID="Dialog" Icon="Core/32x32/open_document.png" Header="Open Item" | |
Text="Select the item that you wish to open. Then click the Open button." OKButton="Open"> | |
<Stylesheet Src="SelectItemWithThumbnails.css" DeviceDependant="true" /> | |
<CodeBeside Type="[YOUR_NAMESPACE].TabbedSelectRenderingForm, [YOUR_NAMESPACE]"/> | |
<DataContext ID="DataContext" Root="/"/> |
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 xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<settings> | |
<setting name="Login.BackgroundImageUrl"> | |
<patch:delete /> | |
</setting> | |
<setting name="Login.BackgroundImageUrl" value="PATH_TO_IMAGE" /> | |
</settings> | |
</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
<?xml version="1.0"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<pipelines> | |
<getChromeData> | |
<processor type="DEG.SC.ExperienceEditor.AddFieldHelpText, DEG.SC.ExperienceEditor" | |
patch:after="processor[@type='Sitecore.Pipelines.GetChromeData.GetRenderingChromeData, Sitecore.Kernel']"/> | |
</getChromeData> | |
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; | |
using System.Linq; | |
using System.Web; | |
using Sitecore.Diagnostics; | |
using Sitecore.Globalization; | |
using Sitecore.Mvc.Presentation; | |
using Sitecore.Pipelines.GetChromeData; | |
namespace DEG.SC.ExperienceEditor | |
{ |
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
@model DEG.SC.HoursOfOperation.Web.Models.HoursOfOperationModel | |
@*Is the business open 24 hours a day?*@ | |
@if (Model.OpenTwentyFourHours) | |
{ | |
<div>Open 24 Hours!</div> | |
} | |
@*Various ways of accessing the days of the week*@ |
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 string SerializeModelToRawValue(HoursOfOperationModel model) | |
{ | |
var serializer = new XmlSerializer(typeof(HoursOfOperationModel)); | |
var stringwriter = new StringWriter(); | |
serializer.Serialize(stringwriter, model); | |
return stringwriter.ToString(); | |
} |
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 model = new HoursOfOperationModel(rawXmlValue); |
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-16"?> | |
<hoursofoperationmodel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<days> | |
<day> | |
<isclosed>false</isclosed> | |
<openingtime>8:00 AM</openingtime> | |
<closingtime>5:00 PM</closingtime> | |
<dayofweek>Monday</dayofweek> | |
</day> | |
<day> |
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-16"?> | |
<hoursofoperationmodel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<days> | |
<day> | |
<isclosed>false</isclosed> | |
<openingtime></openingtime> | |
<closingtime></closingtime> | |
<dayofweek>Monday</dayofweek> | |
</day> | |
<day> |