Skip to content

Instantly share code, notes, and snippets.

@ech01
ech01 / hierarchy.xslt
Created April 6, 2017 13:25
DDR site hierarchy for exporting/importing to other portals or systems. For DNN replace level1 with > level2 with >> level3 with >>> etc. For slickplan replace level1 with -- level2 with ---- etc etc
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:param name="CSSClass"></xsl:param>
<xsl:template match="/*">
<xsl:apply-templates select="root" />
</xsl:template>
<xsl:template match="root">
<xsl:apply-templates select="node" mode="topLevel" />
@ech01
ech01 / Sitemap.xslt
Created October 10, 2016 14:49
Sitemap DDR
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:param name="CSSClass">row sitemap match-height</xsl:param>
<xsl:template match="/*">
<xsl:apply-templates select="root" />
</xsl:template>
<xsl:template match="root">
<div class="{$CSSClass}">
<xsl:apply-templates select="node" mode="topLevel" />
@ech01
ech01 / DnnScheduleExample.cs
Last active September 13, 2021 18:41
DNN Scheduler Example
using System;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Configuration;
using DotNetNuke.Services.Mail;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Portals;
@ech01
ech01 / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ech01
ech01 / razor - every other
Last active August 29, 2015 14:17
Handy way to output a different layout for every other item
@{
int rowCounter = 0;
}
<div>
@foreach(var e in (List)) {
var Content = e.Content;
rowCounter = rowCounter +1;
@ech01
ech01 / sets.json
Last active August 29, 2015 14:13 — forked from anonymous/sets.json
{"Default":{"sets":{"84676cd434499994ef5176c93d970e83079cbc6c":{"id":"84676cd434499994ef5176c93d970e83079cbc6c","name":"Bootstrap Default","string":"| ~ | ~ | (vFl)"},"d521212626e4f9f144821a52dcdaf3e1f6c8cffd":{"id":"d521212626e4f9f144821a52dcdaf3e1f6c8cffd","name":"Three column grid","string":"| ~ | ~ | ~ | (vFl)"},"469eb8921edf75ed3360d5838f9585c0d7a82109":{"id":"469eb8921edf75ed3360d5838f9585c0d7a82109","name":"Outline","string":"| ~ | (vFl)\n| ~ | (hFl)"}},"name":"Default"}}