Skip to content
A set of include files for common functionality in XSLT
XSLT Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
calendarhelper
dist
groupinghelper
lib
mediahelpers
multipickerhelper
navigationhelper
paginationhelper
samples
templates
.gitignore
.tm_properties
README.md
Release Notes.md
build.sh
package.xml
version.ent

README.md

Greystate XSLT Helpers

Miscellaneous XSLT files for use as included stylesheets to ease certain common tasks.

Hopefully, using these helpers you should be able to keep your XSLT clean and readable, with a focus on the logic that's part of your app, not worrying too much about the common functionality stuff that these provide.

Installation

You can find installable packages for Umbraco on the releases page, but if you prefer to install them manually, here's how:

  • Grab helpers subfolder in the dist folder, and put it alongside your other XSLT files (i.e., in the xslt folder if you're using Umbraco).
  • The files in the config folder should go into the config folder of your Umbraco installation.

Basic usage

Using these helpers usually just require the same 2 steps:

  1. Include the file(s) in your main XSLT file using the include instruction:

    <xsl:include href="helpers/_HelperFile.xslt" />
  2. Perform one of the following actions:

    1. Applying templates in a specific mode, e.g.:

      <xsl:apply-templates select="$currentPage/pageImage" mode="media" />
    2. Calling a named template, e.g.:

      <xsl:call-template name="PaginateSelection" />

Helpers

Each helper has its own README but here’s a quick rundown:

Pagination Helper

A self-contained clip-on solution for pagination of node-sets.

"Just add Pagination"

MultiPicker Helper

Makes it very easy to work with various "picker" DataTypes in Umbraco, by having templates for each of the possible content nodes, and then using a key to grab all the picked nodes.

Navigation Helper

Simple Navigation generation - almost too easy. Supports the four most commonly needed navigations: Main navigation, Sub navigation, Breadcrumb and Sitemap.

Grouping Helper

Just like pagination - but for grouping sets into chunks of n elements.

Calendar Helper

Easy as pie generation of that monthly calendar view you always need for your events/news section. Yes to all of these:

Can I use my own translations for the weekdays?

Can I please have monday be the first day?

Can I show events on the dates?

Media Helpers

A bunch of well-tested templates for handling Media items in Umbraco - if you've asked some of the following questions, this is definitely for you:

How can I output Media files and/or folders from my XSLT macros?

But I just want to render the image the user picked - why is it so hard???

How do I output a specific crop version?

Something went wrong with that request. Please try again.