Developing a site with Symphony CMS starts with a basic XSL stylesheet. This is the traditional “Hello, world” example.
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.
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).
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.
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.
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.
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.
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 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.
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 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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:
You will need SSH access to the webspace/webserver.
DesignProjectX | The digital sandbox of Stephen Bau