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.
I’ve been wondering how best to create HTML output with links using relative URLs. There are a number of discussions about how best to redirect internal links in XML content:
But how can I create relative URLs instead? I posted this question on the Symphony CMS forum.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
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.
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.
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.
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).
Jesse Sutherland raised some questions about learning symphony on the Symphony forum. It seems to be a good time to further develop the documentation and add some tutorials to help beginners get acquainted with the system. A glossary of terms might be a good place to start.
To make the process of saving XML files of each entry a little easier, I thought I could create an XSL stylesheet that would output the XML of a single entry. I ended up using Marc Liyanage’s XML Pretty Printer template to create nicely indented XML files.
I want to be able to have easy access to all my site content. I also want to be able to write the content in a text editor so that I can use the features that help the writing process go a lot smoother, such as multiple undos.
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.
So, I’ve got failed, half-finished, barely started web development / social media experiments scattered all over the web. Let’s see if I can remember:
Continuing with my live build of a Symphony site
I credit Andy Clarke with the idea of improving the approach of working with wireframes by using the Grey Box Method. I highly recommend his book, Trancending CSS, for both the fantastic content and beautiful design.
A step-by-step tutorial to build a blog with XML and XSLT, using Symphony CMS
Developing a site with Symphony CMS starts with a basic XSL stylesheet. This is the traditional “Hello, world” example.
Nathan Smith created the 960 Grid System as a CSS framework that provides classes to easily create web pages that can be designed with a 12-column or 16-column grid. I decided to extend his grids as the Fluid 960 Grid System for fluid layouts.
Symphony CMS allows the developer the freedom to create a data structure that suits the content of the site. I won’t be straying far from the usual, to demonstrate the basics. We can always extend these data structures at any time, although, it’s better to have a clear idea in mind at the outset.
A brief description of my entry.
The thing is, when is something really finished on the web? The web is fluid. It is constantly evolving. There’s always more to learn. So, I think “finished” will always be an elusive goal.
It started out as a live build of a Symphony site during An Event Apart, while listening to Jeffrey Zeldman and Eric Meyer, and many other fascinating people.
This is my playground, my sandbox for projects that I am toying with. I learn by doing. So this is where I do some of my stuff.
Colin Moock has written a book called Essential ActionScript 3.0 and I am making it one of my goals to learn how to use as many open source languages as possible to expand on the knowledge I have gained building applications in Symphony, using XML, XSLT and CSS. I’m keenly interested in knowing how the open source Flex SDK 3 can be used to create Rich Internet Applications that integrate with applications like Symphony, built on open source standards such as XML and XSLT.
DesignProjectX | The digital sandbox of Stephen Bau