DesignProjectX

Tutorials

Tutorials

Hello World: A Basic XSL Stylesheet

Posted 5 May 2009 in Technology | XSL | XML | Text

Developing a site with Symphony CMS starts with a basic XSL stylesheet. This is the traditional “Hello, world” example.

Symphony Extensions

Posted 16 May 2009 in Technology | XSL | XML | Text

To get the most out of Symphony, we’re going to need to extend the core system using extensions. Out of the box, Symphony provides some very powerful features. But it assumes nothing about the type of site that we create. To extend the system, let’s explore the available extensions.

Symphony Sections

Posted 20 May 2009 in Technology | XSL | XML | Text

In Symphony, creating Sections is a way of dynamically creating the database structure for your site and the navigation system of the Symphony admin area. This tutorial assumes that you have installed the integration branch of Symphony 2.0.2 from Github (although, this is not essential).

Symphony Data Sources

Posted 20 May 2009 in Technology | XSL | XML | Text

Once the sections have been set up in Symphony, data sources can be configured to output XML that can be used by the XSLT page templates to output HTML pages. These are the data sources that have been used to create this site.

XML Output and the Debug Page

Posted 20 May 2009 in Technology | XSL | XML | Text

Once the sections have been set up and the data sources have been configured in Symphony, XML output can be attached to a page to be processed using the XSLT page template specified in the Body field of the page configuration. The result document can be XML, HTML or text.

Beyond Hello: An XSLT Page Template

Posted 21 May 2009 in Technology | XSL | XML | Text

I started with the basic Hello World example. This tutorial assumes that sections have been created in Symphony and data sources attached to a page. This example shows how I developed the page template that displays the entries that you are currently reading.

Nested Conditionals in XSLT

Posted 21 May 2009 in Technology | XSL | XML | Text

Symphony URLs are actually URL parameters that can be used to manage page views by configuring data sources to limit entries displayed on a page and by using XSLT conditionals to output different results based on the value of each URL parameter. This tutorial is in answer to a question posted on the Symphony forum.

Symphony Utilities

Posted 21 May 2009 in Technology | XSL | XML | Text

The term “utilities” is a Symphony-specific term that refers to XSLT templates that are imported by a page template using an xsl:import instruction. Utilities are often used as master templates that can be used to manage common elements of a page template, such as the html, head and body elements, and for site-wide control of common layout elements, such as the header and footer of the page. They can also be used to build navigation and pagination elements, or to format dates, layout calendars, or perform math or string functions.

Symphony URL Parameters: Managing Page Views

Posted 22 May 2009 in Technology | XSL | XML | Text

Symphony URL Parameters allow a single page template to manage several different views of the XML data. Using XSLT and some flexible URL parameters, it is possible to filter entries by different sets of categories or other forms of metadata to create nested lists. This tutorial is in answer to a question about filtering content on the Symphony forum.

Entries Navigation Menu

Posted 24 May 2009 in Technology | XSL | XML | Text

Using XSLT and Symphony, it is a fairly simple matter to develop a list of entries that can indicate the currently selected entry using a URL parameter and an xsl:if conditional instruction. We will be relying heavily on attribute value templates to build the links for the pages.

A Master XSLT Template

Posted 24 May 2009 in Technology | XSL | XML | Text

A master template helps to simplify the management of common elements of the HTML and layout structure. This tutorial outlines how the master XSLT template has been built for this site.

XML Syntax Highlighting

Posted 25 May 2009 in Technology | XSL | XML | Text

I noticed that both the new Symphony CMS site and Nick Dunn’s personal site both use similar syntax highlighting for XML code examples and snippets and I wanted to see what it might take to implement the same thing on this site. As it turns out, it wasn’t very difficult at all.

Importing XML in Symphony

Posted 25 May 2009 in Technology | XSL | XML | Text

Probably the major impediment for the widespread adoption of Symphony as a content management system, besides the fear factor of XSLT, is probably the changes to the core database management code and structure. This has prevented a smooth transition from version 1.6 to 1.7 and from 1.7 to 2.0. However, Symphony 2.0 can import XML, it just takes a little bit of set up.

Symphony Events

Posted 25 May 2009 in Technology | XSL | XML | Text

Events are PHP classes or functions that can be attached to a page template to perform specific functions that are out of the realm of what XSLT alone can accomplish. Extensions can sometimes include events that can be attached to a page. Built into Symphony is a way of creating events that can be used to save data to the database from front-end forms as a single entry or even multiple entries at one time, with the option of sending an email message on successfully saving an entry or entries.

Importing Entries from WordPress

Posted 25 May 2009 in Technology | XSL | XML | Text

This is a proof of concept for importing XML into Symphony using an event and a front-end form that is populated with data from a WordPress Export File. It is a continuation of the tutorials on Importing XML in Symphony and Symphony Events.

Ninja Domains: A Multi-Domain Setup using the Symphony XSLT Content Management System

Posted 15 June 2009 in Technology | XSL | XML | Text

My first contributing author, Michael Eichelsdörfer, has been using Symphony CMS in some very interesting ways. This particular technique, using a single Symphony install to run multiple domains, intrigued me. Michael has been kind enough to satisfy my curiosity by putting together a tutorial.

This tutorial covers an advanced multi-domain setup. Several websites may be powered by a single Symphony installation, using a single backend. This may be useful in case of websites having the same owner, intended to share content and/or technical solutions.

Master/Detail Views in Symphony

Posted 17 June 2009 in Technology | XSL | XML | Text

A common question on the Symphony CMS forum is about how to display a single entry in Symphony. The answer to this question involves Symphony data sources and URL parameters, and XSL conditional statements. This tutorial will go through the process of using Symphony to create a section, two data sources, a utility and a couple pages to describe step-by-step the process of building a page template that will output a list view or detail view of a page depending on the currently selected URL.

Using GitHub to Build a Symphony Ensemble

Posted 20 June 2009 in Technology | XSL | XML | Text

This may be less a tutorial than a record of the steps I took to build a Symphony ensemble while using GitHub as a version control system. One challenge I have yet to come to terms with is how to deal with changes to the database as I make changes to the application.

Symphony Maintenance Mode

Posted 22 June 2009 in Technology | XSL | XML | Text

With the Symphony CMS Maintenance Mode extension, the application can be set to redirect all pages to a page that has been given a type of “maintenance”. If all you need is to replace the home page with a temporary page, just change the .htaccess file.

Symphony Extensions and Git Submodules

Posted 5 July 2009 in Technology | XSL | XML | Text

I am in the process of evaluating some of the available Symphony CMS extensions and have been experimenting with including extensions as submodules in Symphony ensemble repositories. This is a list of the commands used to set up additional submodules for a clean Symphony install.

Ninja Domains Part 2: Including SSL in a Multi-Domain Setup using the Symphony XSLT Content Management System

Posted 16 September 2009 in Technology | XSL | XML | Text

This is the second part of a tutorial by my first contributing author, Michael Eichelsdörfer.

In Part 1 of this tutorial we built an an advanced multi-domain setup to power several websites by a single Symphony installation, using a single backend. This approach works fine for SSl/non-SSL domains as well.

Imagine the following situation: You have a website running on Port 80 (non-SSL). Because your “about” page includes a contact form sending sensitive data, you would like to serve this page encrypted by SSL (Port 443).

This tutorial is not about SSL installation. We assume that SSL is working and you are running a (sub)domain with SSL (port 443), while your main www domain is non-SSL (i.e. listening on port 80). Running SSL on the main domain is not covered in this tutorial, since this is a rather simple case. It will only require a subset of the techniques described below.

Prerequisites:

  • Symphony XSLT Content Management System
  • Apache webserver meeting Symphony’s requirements
  • main domain running without SSL (port 80)
  • second (sub)domain running with SSL (port 443)

You will need SSH access to the webspace/webserver.

DesignProjectX | The digital sandbox of Stephen Bau