Search

Yes, that’s a know bug. I’m currently working of an immense clean-up update of all JavaScript files that should fix this and some other issues. So please stay tuned.

As I mentioned in my last post, I’m currently cleaning up the different JavaScript components needed for Subsection Manager. If you think you are one of these Tarzan-like man of the wild, eager to explore the deep jungle of unexpected behaviours, drop me a line to get access to the current development copy of this extension (post@nilshoerrmann.de). It’s an alpha build of the upcoming version 1.2 which currently fixes a lot of outstanding bugs:

  • Correctly separate Subsection Manager features from Stage and Draggable.
  • Making the single select mode work.
  • Allowing dropping while disallowing sorting.
  • Fix Data Source filtering.
  • Fix handling of formatted and unformatted elements in Data Source output.

A few things are still in the works:

  • Reworking Draggable and adding custom drop captions.
  • Add a setting for the section table view to show either the current item count or a list of selected items.
  • Add a setting to append the count of selected items to the Data Source output.

Tarzan-like man of the wild, eager to explore the deep jungle of unexpected behaviours…

… that sounds enticing ;-)

To come back to the bug I mentioned: strangely it seems to occur sometimes only. I.e. I have another section setup in which it is fine to leave the SSM field empty. Any idea what causes the bug?

Yes, I know the causes and they were the reason to clean-up the JavaScript files. It’s complicated. A bug in the single vs. multiple mode setup.

Hi Nils,

I figured it all out with the installation. It’s a great extension, really time saving!

Only there is one thing not working for me. I added a subsection called ‘Rooms’ to a section called ‘Resorts’. So that Resorts has Rooms.

When i’m in the resort CMS, i try to add a Room to the resort by using the Subsection manager. i Fill in all the fields, but when i press ‘Save Changes’ it doesn’t save. It only closes showing a small piece of the black content fill beneath. When i reopen the room, it’s empty so it didn’t save anything.

I added all the resources to the subsection manager in the ‘Room’ Section and in the ‘Resort’ datasource.

what to do?

Thanks!

Sandor

Ah, I already know what it is…

it had to do with the validation rule. i entered ‘number’.

Sorry

Nils, I’m not really sure it’s been posted before, but anyway.

When sorting is disabled, inline editing of previously created entries is also disabled. Should I file this as a bug?

Yes, please.

I’ve posted it in the symphony bugtracker.

If I should post it in the github tracker instead, let me know.

Nils, help :)

I use Subsection Manager in my CMS but I need to add my own extension (it’s just for the purpose of this particular CMS). It’s the most trivial extension you’ve ever seen, details are here:

    public function getSubscribedDelegates() {
        return array(
            array(
                'page'      => '/backend/',
                'delegate'  => 'InitaliseAdminPageHead',
                'callback'  => 'addJSHeaders'
            )
        );
    }

    public function addJSHeaders($context) {
        $page = $context['parent']->Page;

    $page->addScriptToHead(URL . '/extensions/custom_extension/assets/show_hide_jquery.js', 30001); 
    $page->addScriptToHead(URL . '/extensions/custom_extension/assets/show_hide.js', 30002);

    }

The problem is that the first addScriptToHead (just a jquery 1.4.2) makes SubsectionManager not working properly, namely the “search textbox” gets invisible. show_hide.js is an empty file. A collision or something? And I don’t get the idea behind the second integer argument of addScriptToHead method, maybe that is the case.

Is there a special need why you bundle another jQuery version with your extension? I guess that using two versions of jQuery side by side results in a JavaScript error which then stops Subsection Manager execution.

Do you have any errors in your JavaScript console?

Hmm… I’ve changed my code so that it uses jQuery which is already loaded (by other scripts). It is an extension for this one particular CMS only so it is not a bad solution but I don’t know how I would solve it in general.

Let’s say that I’m writing an extension which takes advantage of jQuery. And I must load jQuery, of course. And then Subsection Manager comes, Image Cropper comes, and they all load their own jQueries. There must be a conflict, what should I do to write a real multi-purpose jQuery extension?

None of these extensions will load jQuery as it’s bundled with the Symphony core. Could you please open a new thread as this seems not to be a Subsection Manager related problem. Thanks!

without something semantically tying the subsection to the parent section, is this a viable solution if you’re going to do front end editing with events and such, or is it better to use select box links?

this is fantastic for the back end and i use it in dozens of sections, but i have a particular section with subsections that needs to be modified from a front end page.

fawx, I’m not sure if I understand what you are asking for?

The ‘old’ Mediathek seems to work ok with Symphony 2.1.1, that way the image dragging into CKEditor & TinyMCE works again.

To display the image OK in the frontend I used this little utility:

<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="img" mode="html">

        <xsl:variable name="width" select="@width"/>
        <xsl:variable name="height" select="0"/>
        <xsl:variable name="src" select="concat('uploads', substring-after(@src, 'uploads'))"/>

        <img class="content-image">
            <xsl:attribute name="src">
                <xsl:value-of select="$root"/>
                <xsl:text>/image/1/</xsl:text>
                <xsl:value-of select="$width"/>
                <xsl:text>/</xsl:text>
                <xsl:value-of select="$height"/>
                <xsl:text>/</xsl:text>
                <xsl:value-of select="$src"/>
            </xsl:attribute>
        </img>

     </xsl:template>

</xsl:stylesheet>

Along with the typography.xsl utility to insert the text.

I’m trying to reproduce some of the functionality of the Subsection Manager in a front end form, but I’m not sure how how I should actually go about doing this.

I created an experimental Symphony To Do List ensemble to test out the beta version of the Subsection Manager: http://getsymphony.com/discuss/thread/41122/2/#position-24

I have updated the ensemble to Symphony 2.1.1 and updated the Subsection Manager extension to version 1.0.1. I created an experimental branch to test out the possibilities of being able to create a new item and add it to a list. Creating a new item is straight forward, but adding it to a list at the time of creation would mean updating two sections from the front end form.

Another issue would be the customizations to the Save List event necessary to save the items associated with each list to the Subsection Manager tables.

I might be better off using a Select Box Link field so each item contains the data for its associations with the parent list. And it would be possible to save items without having to also save the entry from the parent section.

I’m just wondering, Nils, if you have a suggestion for how a front end form could save a Subsection Manager entry.

Stephen, I’ve never thought about using the Subsection Manager on the frontend but the longer I think about it I guess it should work out of the box. As inline creation is handled via an iframe there should be no need to update two sections at once via the frontend form. If you take a look at the backend source code generated by the extension, you’ll see that the only things needed for field storage are a select box with the current selection and an input containing the sort order. Everything else is pure JavaScript magic salted with a few AJAX calls. As long as you replicate the HTML structure given in the backend and add all needed script files, it should work.

I have finally taken a close look at this extension and I like it.

I have an Articles section and a Categories section. I use a Select Box Link (labeled Category) to assign a category to each article. I found that I can convert the Category Select Box Link field to a SSM field by taking these steps:

  • Add a SSM field to the Articles section, label it Category2 and attach the Categories section.
  • Manually change field_id in the sym_fields_stage table to refer to the old Category sym_entries_data_ table instead of the new Category2 sym_entries_data_ table.
  • Do the same in the sym_fields_subsectionmanager table.
  • In the old Category sym_entries_data_ table change the type field in the sym_fields table from selectbox_link to subsectionmanager.
  • Delete the Category2 entries in sym_fields_stage and sym_fields_subsectionmanager.
  • Delete the new Category2 sym_entries_data_ table.

Now the Select Box Link field is changed to a SSM field that is labeled Category instead of Category2 and contains all the previous article-category assignments.

Stephen, I’ve never thought about using the Subsection Manager on the frontend but the longer I think about it I guess it should work out of the box. As inline creation is handled via an iframe there should be no need to update two sections at once via the frontend form. If you take a look at the backend source code generated by the extension, you’ll see that the only things needed for field storage are a select box with the current selection and an input containing the sort order. Everything else is pure JavaScript magic salted with a few AJAX calls. As long as you replicate the HTML structure given in the backend and add all needed script files, it should work.

this is essentially what i was getting at.

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