Search

Hi,

I'm trying to include a non-flash audio playlist on a website powered by Symphony CMS. I'm using projekktor Has anybody tried something similar?

Here is the website I'm trying to do this for: adam baker

It appears that Projekktor reads playlists as a separate JSON file (example on the Projekktor site). Just add another page and create that JSON-schema using XSLT.

Thank you phoque. I've created a json page in Symphony. The problem I've got at the moment is that Symphony adds a commented events tag to my json file although I'm using the Content Type Mappings extension, I've added the "json" => "application/type" line to my config.php file and I've identified the page in the page settings in the backend as a json type page. I don't know what I'm doing wrong.

I've noticed that Symphony adds the events tag to all html pages that it outputs as well. Could it be a bug in symphony or am I not writing the page template correctly?

Here is a link to a json page.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output output="text" omit-xml-declaration="yes" />

<xsl:template match="data">
    <xsl:text>{"playlist":[</xsl:text>
    <xsl:apply-templates select="samples/entry"/>
    <xsl:text>]}</xsl:text>
</xsl:template>

<xsl:template match="samples/entry">
    <xsl:text>{"0":{"src": "</xsl:text>
    <xsl:value-of select="$workspace"/>
    <xsl:value-of select="upload/@path"/>
    <xsl:text>/</xsl:text>
    <xsl:value-of select="upload/filename"/>
    <xsl:text>", "type": "audio/mp3"}, "config":{"title":"</xsl:text>
    <xsl:value-of select="caption"/>
    <xsl:text>"}}</xsl:text>
    <xsl:if test="position() != last()">
        <xsl:text>, </xsl:text>
    </xsl:if>
</xsl:template>

</xsl:stylesheet>

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