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
CREATE TABLE [cmsPreviewXml]( | |
[nodeId] [int] NOT NULL, | |
[versionId] [uniqueidentifier] NOT NULL, | |
[timestamp] [datetime] NOT NULL, | |
[xml] [ntext] NOT NULL, | |
CONSTRAINT [PK_cmsContentPreviewXml] PRIMARY KEY CLUSTERED | |
( | |
[nodeId] ASC, | |
[versionId] ASC | |
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] |
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
npm install | |
npm install -g grunt-cli | |
npm install -g bower | |
grunt build --buildversion=7.4.3 |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using Newtonsoft.Json; | |
using Umbraco.Core.Logging; | |
using Umbraco.Core.Models.Membership; | |
using Umbraco.Core.Services; | |
using Umbraco.Web.HealthCheck; |
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 static Guid GetKey(this IPublishedContent content) | |
{ | |
IPublishedContent um = content; | |
var wrapped = um as PublishedContentExtended; | |
while (wrapped != null) | |
wrapped = (um = wrapped.Unwrap()) as PublishedContentExtended; | |
var contentWithKey = um as IPublishedContentWithKey; | |
return contentWithKey == null ? Guid.Empty : contentWithKey.Key; | |
} |
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
ALTER TABLE [dbo].[cmsPropertyTypeGroup] WITH CHECK ADD CONSTRAINT [FK_cmsPropertyTypeGroup_cmsPropertyTypeGroup_id] FOREIGN KEY([parentGroupId]) | |
REFERENCES [dbo].[cmsPropertyTypeGroup] ([id]) | |
GO | |
ALTER TABLE [dbo].[cmsPropertyTypeGroup] CHECK CONSTRAINT [FK_cmsPropertyTypeGroup_cmsPropertyTypeGroup_id] | |
GO | |
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
Import-Module -Name D:\Temp\ACME-posh\ACMEPowerShell.psd1 | |
$domain = "mydomain.com" | |
$certificiatePassword = "abcd1234" | |
$email = "letsencrypt@mydomain.com" | |
$vault = "D:\Vault\{0}\{1}" -f $domain, [guid]::NewGuid() | |
mkdir $vault | |
cd $vault | |
Initialize-ACMEVault -BaseURI https://acme-v01.api.letsencrypt.org/ | |
New-ACMERegistration -Contacts mailto:$email |
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
dir | Rename-Item -NewName { $_.Name.Substring(1, $_.Name.Length - 1) } |
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
var contentService = UmbracoContext.Application.Services.ContentService; | |
var content = contentService.GetById(Model.Content.Id); | |
var currentValue = content.GetValue<bool>("myProp"); | |
content.SetValue("myProp", !currentValue); | |
contentService.SaveAndPublishWithStatus(content); |
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
using System.Configuration; | |
using System.Web.Mvc; | |
using Umbraco.Web.Mvc; | |
using Umbraco.Web.UI.Umbraco.Controls; | |
namespace My.Controllers | |
{ | |
public class MyUpdateController : SurfaceController | |
{ | |
public ActionResult Create(SomeModel model) |
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
@using Awesome.FormDemo.Controllers | |
@model Awesome.FormDemo.Models.TicketOrderModel | |
@if (TempData.ContainsKey("CustomMessage")) | |
{ | |
<div>Hooray! - @TempData["CustomMessage"]</div> | |
} | |
else | |
{ | |
using (Html.BeginUmbracoForm<TicketOrderController>("FormSubmit")) |