Search

You can say it louder!

Haha.. I know but I wouldn't want the Symphonians getting jealous :).

Thanks, guys. I had hoped to start building other things with this by now, but I realized that it would be good to optimize the code so that the XSLT was more object-oriented, if I can call it that. As much as possible, the controls have been abstracted to allow for the ability to replace existing data sources and parameters with those of other sections. To accomplish this, a list of parameters has been declared at the beginning of each page which is referred to by the imported utility, which now contains all the common elements as more generic named templates.

<xsl:param name="entry-type" select="'section'"/>
<xsl:param name="entries-type" select="'sections'"/>
<xsl:param name="entry-type-title" select="'Section'"/>
<xsl:param name="entries-type-title" select="'Sections'"/>
<xsl:param name="entries" select="$sections"/>
<xsl:param name="entries-root" select="$current-path"/>
<xsl:param name="entry-details" select="$section-details"/>
<xsl:param name="entry-event" select="'publish-section'"/>
<xsl:param name="event-result" select="/data/events/publish-section"/>
<xsl:param name="entries-event" select="'publish-sections'"/>
<xsl:param name="event-results" select="/data/events/publish-sections"/>

Now, each page contains only what is unique to each section, specifically, the section fields.

Edit: Deleted this attachment because of the bug mentioned below.

Sorry, I disabled multiple entry editing in the menus and pages sections because the entries-list-actions template in the site-entries-pages.xsl utility had a hard-coded entries event in the submit input. I changed it to the following:

<xsl:template name="entries-list-actions">
  <div class="actions">
    <a href="{$entries-root}/delete/" title="Delete multiple {$entries-type}" class="delete button{$delete-active}">
      Delete
    </a>
    <xsl:choose>
      <xsl:when test="not($entry)">
        <input name="edit" type="submit" value="Edit {$entries-type-title}"/>
      </xsl:when>
      <xsl:when test="$entry = 'edit' or $entry = 'sort'">
        <input name="action[{$entries-event}]" type="submit" value="{$current-action-title} All {$entries-type-title}"/>
      </xsl:when>
      <xsl:otherwise>
        <input name="action[{$entries-event}]" type="submit" value="{$current-action-title} Selected {$entries-type-title}"/>
      </xsl:otherwise>
    </xsl:choose>
  </div>
</xsl:template>

Edit: Attached is the revised ensemble.

Final Beta Release: System Navigation 0.2

This the finalized version of the ensemble. Feed it data and configure the parameters and the event entry forms in the following format (note the additions of classes for section links and fields to show as columns in the lists):

<site-sections>
  <section branch="ancestor">
    <title lowercase="menus" handle="menus">Menus</title>
    <type lowercase="menu" handle="menu">Menu</type>
    <form method="post" action="" enctype="multipart/form-data">
      <input name="MAX_FILE_SIZE" type="hidden" value="5242880" />
      <label class="show">Title
        <input name="fields[title]" type="text" />
      </label>
      <label class="show">Description
        <textarea name="fields[description]" rows="15" cols="50"></textarea>
      </label>
      <label>Deleted
        <input name="fields[deleted]" type="checkbox" />
      </label>
      <input name="action[publish-menu]" type="submit" value="Submit" />
    </form>
  </section>
  <section branch="parent">
    <title lowercase="sections" handle="sections">Sections</title>
    <type lowercase="section" handle="section">Section</type>
    <form method="post" action="" enctype="multipart/form-data">
      <input name="MAX_FILE_SIZE" type="hidden" value="5242880" />
      <label class="show">Title
        <input name="fields[title]" type="text" />
      </label>
      <label class="show">Menu
        <select name="fields[menu]" class="section-link"/>
      </label>
      <label class="show">URL
        <input name="fields[url]" type="text" />
      </label>
      <label class="show">Sort
        <input name="fields[sort]" type="text" />
      </label>
      <label>Heading
        <input name="fields[heading]" type="text" />
      </label>
      <label>Description
        <textarea name="fields[description]" rows="8" cols="50"></textarea>
      </label>
      <label>Body
        <textarea name="fields[body]" rows="16" cols="50"></textarea>
      </label>
      <label>Deleted
        <input name="fields[deleted]" type="checkbox" />
      </label>
      <input name="action[publish-section]" type="submit" value="Submit" />
    </form>
  </section>
  <section branch="self">
    <title lowercase="pages" handle="pages">Pages</title>
    <type lowercase="page" handle="page">Page</type>
    <form method="post" action="" enctype="multipart/form-data">
      <input name="MAX_FILE_SIZE" type="hidden" value="5242880" />
      <label class="show">Title
        <input name="fields[title]" type="text" />
      </label>
      <label class="show">Section
        <select name="fields[section]" class="section-link"/>
      </label>
      <label class="show">URL
        <input name="fields[url]" type="text" />
      </label>
      <label class="show">Sort
        <input name="fields[sort]" type="text" />
      </label>
      <label>Heading
        <input name="fields[heading]" type="text" />
      </label>
      <label>Description
        <textarea name="fields[description]" rows="8" cols="50"></textarea>
      </label>
      <label>Body
        <textarea name="fields[body]" rows="16" cols="50"></textarea>
      </label>
      <label>Deleted
        <input name="fields[deleted]" type="checkbox" />
      </label>
      <input name="action[publish-page]" type="submit" value="Submit" />
    </form>
  </section>
</site-sections>

This ensemble has been updated to be in sync with the latest Projects ensemble.

Edit: There was a fix necessary for the System page CSS.

Hey bauhouse, how can I get a hold of you? Can you email me? I attached an image with my email address. I already get enough spam!

Thanks!

Attachments

@michael_halvorsen, check your email.

System Navigation Ensemble 0.3

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. (See above)

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