Search

Edit: Updated to Symphony 2.0

Rather than create documentation, since Mark is already hard at work on this, I thought I would create a working application that documents the process of building an application and demonstrating what can be accomplished with Symphony.

As a first step, I have created an ensemble that will serve as the starting point for all my applications. It includes some useful utilities:

  • html-manipulation.xsl
  • search-and-replace.xsl
  • typography.xsl (by Allen Chang)
  • xml-prettyprinter.xsl (by Marc Liyanage)

The Symphony developers system navigation has been integrated as a dynamically generated menu in anticipation of the system data sources that are currently in the works.

The main aim of the System Navigation ensemble is to demonstrate the possibilities for developing alternate admin navigation and layouts to extend the core features of Symphony using custom admin pages.

Updated

Updated the ensemble from Symphony 2 Beta Revision 5 to Symphony 2.0 (zip download). It also includes a brief introduction to Symphony that provides a quick tour of the system.

Now that ensembles and extensions are seeing some activity, looks like we need to push to get the Overture download pages out quicker.

That would be great, especially with PayPal donations.

I have added an interface for viewing linked sections. This allows the ability to view three sections at once and view the relationships between each entry. It also provides controls for actions that can be made to each entry. If no entry is selected, the edit, copy and delete buttons are disabled. If an entry is selected, the buttons are activated for that entry. Note that I have only enabled editing for menus. I'll hook up the rest of the actions for this section and the other two when I get the time.

See the attached screenshot for a preview of what this looks like.

Here is the updated ensemble.

Stephen, this is awesome!

Thanks, Michael.

Here's the latest build. (Still not complete, but getting there.) This adds a list of entries on the edit page.

Just about finished. Here's where I'm at with enabling actions for edit, copy, and preview for sections and pages. Delete has yet to be implemented.

Just messing around with this now... VERY impressive. I'm sure to mine it for ideas over the next few months. Thanks.

The ensembles are great way to back up your site, but it's not apparent to me how it facilitates the insertion/update of a site. Say for instance, the original 0.1 release you have. I would start with that but then you release 0.1.3. Do I have to drop all the tables, and reinstall using the install.php?

In regards to the System Navigation:

Awesome! :D

Thanks, ibolmo and czheng.

And, ibolmo, you're right about updating a site. Symphony ensembles are set up for easy installation, but not for updating. Probably the best way to update would be to replace the workspace and then add or modify pages to match any changes that have taken place.

As this is more of a proof of concept than a complete theme, I would expect this to be used more as a basic module to build other sites on. I would generally use this ensemble as an example of how to set up pages and datasources. Then, workspace assets can be dropped into an existing site and if the pages and data sources are set up in the same way, the XSLT templates should be duplicate the same behaviour from one site to another.

So, the intention is that to use this ensemble would mean dropping all the tables and reinstalling. Then, if you have an existing site to which you would like to add similar functionality, you should be able to grab the templates that you need and add or modify pages and data sources to match this ensemble and you can retain the data you had before.

Beyond that, I suppose it could be created as an extension, but I think that would be a PHP only solution.

It would be great to have the option to add assets, templates, pages and data sources as modules that can be installed or uninstalled at will. But I'm not sure that it's feasible.

Here's the latest build. I believe creating, editing, copying and previewing will work for all three sections (though I haven't had time to fully test this yet). However, delete is still not working and probably won't be working until a few bugs are figured out.

I could probably workaround these limitations by using a select box instead. But I'd rather wait for the ideal solution.

At some point I'm going to build a research app that relies heavily on all this front-end action, and your ensemble is going to prove invaluable...

@czheng, glad this will come in handy for you.

I was wrong about filtering by checkbox fields. I hadn't entered values for the checkboxes after creating the new publish fields.

Also, there is a fix for editing individual front end entries.

I was going to use a Publish checkbox and change the value to 'No', but it is still the case that front end entries cannot change checkbox values from 'Yes' to 'No'. They can, however, change the value from 'No' to 'Yes'. So, I've changed the name of the checkbox field to "Deleted" and given all entries a value of 'No' (or unchecked).

Now the delete action has been enabled for all three sections. There are some minor enhancements that I can think of, but generally, I believe this latest ensemble is feature complete. Enjoy!

(By the way, the ensemble includes the html-manipulation.xsl utility with the additions submitted by Makenosound.)

The enhancements I was talking about were listing and editing multiple entries. This has been added in the latest ensemble.

I think the last thing needed is list sorting.

List sorting has been added.

Now, let me know if it is valuable to keep all the iterations of the process of building this application. I'm thinking it is worthwhile as the earlier examples are easier to understand for those who might be new to XSLT and want to learn from what I've done. As I add more features, the number of necessary parameters and conditionals grow and it may become a little harder to follow what I'm doing.

At any rate, here is the latest ensemble.

The only thing I can think of that might be missing now is dynamic filtering of lists, but I figure this is already happening in the dashboard overview. The case where this might be useful is when wanting to edit multiple sections in a specific menu or pages in a specific section. Rather than make the existing pages more complicated, I would probably want to add a page called "Filter" as a child page of each section list page. That way, I can have URL parameters like this:

  • Menus: menu/id/action
  • Sections: menu/section/id/action
  • Pages: menu/section/page/id/action

A Note About Deleting

You'll notice that when entries are deleted from the front end, the entries are still retained in the database. All I am doing is changing the "Deleted" field of each section entry to have a value of 'Yes'. To restore these entries, you need only go into the Symphony admin and select these entries and apply "Set Deleted to Yes". I found this was a great way to test that editing was working and the notices were being properly generated without changing any of the content. Another way to test that error notices are working for multiple entries editing is to delete the title or the sort value of an entry. You should get descriptive warning notices telling you which entries encountered errors and what the error was.

A Symphony Versioning System

The idea for a versioning system came from the possibility of now being able to copy individual (or even multiple) entries. Now, if a date field is added and the current date and time is used for the value when the entry is saved, duplicate entries can be created with the only difference being the time-date stamp. This effectively opens up the possibility of never deleting anything from the database, but only grabbing the latest instance of each entry. This would probably best be accomplished with a section link to a parent id where each child is a time-date stamped version of the entry. That way it should be possible to easily grab the latest entry by creating a data source that displays one entry from a list of entries sorted in descending order by date. To make this even easier, the "Deleted" field should be changed to 'Yes' for all entries but the latest entry so entries can be filtered by "Deleted = 'No'".

Restoring entries from the front end will, however, have to wait until the front end checkbox field bug is fixed.

Sorry, that last version (0.1.7) had some bugs so I removed it: the section links for sections and pages weren't saving properly because I had the entries array id set to [0] instead of the dynamically generated value of [{$index}].

Also, the "Edit All" buttons weren't working after sorting.

psst you rock

psst you rock

You can say it louder!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details