Search

Some may of already caught the discussion in this thread about different approaches to structuring your XSLT so that you are not repeating yourself and that your code makes sense, today, tomorrow and in the future.

I mentioned a modular approach to XSLT, which is what I was taught at R&B from Rowan, and we've gone on to make it our defacto style for all Symphony projects.

The concept is that your templates are modular and mapped to your sections. Explaining XSLT is not my strong point, so I went ahead and converted the XSLT to this approach, as if someone in the R&B office built it.

It might be helpful for some, or just something curious for others. Enjoy!

Thanks, mate. I like the approach, and this example is really instructive.

Cheers! I've given my XSLT organization a lot of thought recently. This improves my workflow considerably and aligns very well to my thought process. I really like the idea of having a sections folder. I see two important factors here: 1) reuse, and 2) maintainability.

I have utilities for different types of things in addition to true basic utilities. For instance, I have a utility for blogs. It's definitely an improvement to my XSLT in the past but I always hated putting it in the utilities folder for a couple reasons: 1) very specific use which limits its use, and 2) unlike true utilities it changed significantly from project to project (which in my eyes defeated the true nature of a utility). So, while I was able to achieve reuse with my XSLT, it was lacking significantly on maintainability.

Thanks for sharing the approach! This should be the new "Best Practice."

Thanks for sharing.

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