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
:: ###### BACK-UP JOB ###### | |
@ECHO OFF | |
:: Set the constants | |
SET BACKUP_DIR=C:\path\to\_backup | |
SET TEMP_DIR=%BACKUP_DIR%\TEMP | |
SET TODAY=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2% | |
SET ARCHIVE_DIR=%BACKUP_DIR%\%TODAY% | |
SET WWWROOT_NAME="ProjectName" | |
SET WWWROOT_SOURCE=C:\path\to\wwwroot |
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"?> | |
<!DOCTYPE xsl:stylesheet [ | |
<!ENTITY nbsp " "> | |
]> | |
<xsl:stylesheet | |
version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:msxml="urn:schemas-microsoft-com:xslt" | |
xmlns:umbraco.library="urn:umbraco.library" | |
xmlns:PS.XSLTsearch="urn:PS.XSLTsearch" |
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 uComponents.Core.uQueryExtensions; | |
using umbraco.presentation.umbracobase; | |
namespace Our.Umbraco | |
{ | |
[RestExtension("examples")] | |
public class Examples | |
{ | |
public static bool ArchiveNewsPages() | |
{ |
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
[ | |
{ | |
"id": "0001", | |
"type": "donut", | |
"name": "Cake", | |
"ppu": 0.55, | |
"batters": | |
{ | |
"batter": | |
[ |
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
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %> | |
<%@ Import Namespace="umbraco" %> | |
<script runat="server"> | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
var url = uQuery.GetCurrentNode().GetPropertyAsString("url"); | |
if (!string.IsNullOrEmpty(url)) | |
{ | |
Response.RedirectPermanent(url, true); |
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.Web.UI.WebControls; | |
using umbraco.cms.businesslogic.datatype; | |
namespace Our.Umbraco.DataTypes | |
{ | |
public class USStates : AbstractDataEditor | |
{ | |
private DropDownList m_Control = new DropDownList(); |
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
-- Uncomment below to verify the number of nodes returned is the same as the number of nodes that is in the Recycle Bin | |
-- SELECT * FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20 | |
-- Delete all 'related' nodes and table contents... | |
DELETE FROM cmsPreviewXml WHERE nodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20) | |
DELETE FROM cmsContentVersion WHERE contentId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20) | |
DELETE FROM cmsDocument WHERE nodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20) | |
DELETE FROM cmsContentXML WHERE nodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20) | |
DELETE FROM cmsContent WHERE nodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20) | |
DELETE FROM cmsPropertyData WHERE contentNodeId IN (SELECT id FROM umbracoNode WHERE path LIKE '%-20%' AND id != -20) |
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
<%@ Master Language="C#" MasterPageFile="~/masterpages/BlankTemplate.master" AutoEventWireup="true" %> | |
<script runat="server"> | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
var current = umbraco.NodeFactory.Node.GetCurrent(); | |
if (current != null) | |
{ | |
var child = current.ChildrenAsList.FirstOrDefault(); | |
if (child != null) | |
{ |
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"?> | |
<!DOCTYPE xsl:stylesheet [ | |
<!ENTITY nbsp " "> | |
]> | |
<xsl:stylesheet | |
version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:msxml="urn:schemas-microsoft-com:xslt" | |
xmlns:umbraco.library="urn:umbraco.library" | |
exclude-result-prefixes="msxml umbraco.library"> |