0 users online. Create an account or sign in to join them.Users

Search

Subsection Manager 2

Subsection Manager

Symphony offers an easy way to create sections and model the fields the way you like. Nevertheless, from time to time you need to connect the content of two sections: you might have an articles section you'd like to link images to, or you are building a books section you'd like to connect with authors. With a default Symphony install, you can use select boxes or selectbox links to create these connections, but you will not be able to see and manage all your content at once. The Subsection Manager tries to solve this problem by providing an inline management of another section's content. By adding the Subsection Manager field to your parent section, you can integrate another section as a subsection. The subsection's entries can be managed through the inline interface as well as the regular Symphony section entry list. You can opt for inline editing only by simply hiding the specified section from the menu.

Subsection Manager is the successor of Mediathek and requires Symphony 2.1 or newer. Subsection Manager and Mediathek should not be used simultaneously. This extension comes with an upgrade script that automatically replaces all Mediathek fields with the Subsection Manager (see below).

Subsection Tab

Subsection Tabs

As of version 2.0 this extension bundles a second field type: Subsection Tab. It provides a tabbed interface of subsection entries that is well suited to manage multilingual content. All tabs are static and have to be set up in the field settings.

Installation

Subsection Manager contains two components:

  • The Subsection Manager itself which handles the section interactions,
  • Stage which offers the interface for the inline section management and

If you are working with Git, please clone the 1.x branch of this extension which contains all additional components as submodules. Please don't forget to pull the submodules as well. If you are not using Git and want to install this extension using FTP, please just download a copy of the master branch which bundles all needed submodules. More information about installing and updating extensions can be found in the Symphony documentation at http://getsymphony.com/learn/.

All interface related components of the Subsection Manager are JavaScript based. If you are upgrading from an earlier version, please make sure to clear your browser cache to avoid interface issues. If another extension or the Symphony core throws a JavaScript error, the Subsection Manager will stop working.

Updating

To update Subsection Manager to a newer version perform the following steps:

  • Make sure that you have a working backup of your Symphony install.
  • Update the Subsection Manager folder by either updating the submodule or by replacing the files manually.
  • Log into the backend and enable the Subsection Manager extension to run the update script.

Updating to version 2.0: Please note that this is major release and that you will have to reset item sorting and included elements manually.

Upgrading Mediathek Fields

If you have Mediathek and Subsection Manager installed simultaneously, the interface of both extensions will be broken. While Mediathek is built to work with Symphony 2.0, Subsection Manager relies on the improved features of Symphony 2.1. If you have both extensions installed, the system will show a message in the extension overview which will help you to upgrade all your Mediathek fields to Subsection Manager.

Be aware that this upgrade process will alter your database and will uninstall your Mediathek extension. Make sure that you have an up-to-date backup of your site, containing all files and folders, and a copy of your database before you proceed with the upgrade. The upgrade cannot be undone.

Acknowledgement

The drawer colors and layout were inspired by Scott Hughes' Calendar Mock-up and Rowan Lewis' Calendar Overlay.

A lot of people have been testing this extension and providing valuable feedback. A big thank you to all of you, in alphabetic order: Aaron Harnly, Adam Fox, Alistair Kearney, Allen Chang, Andrea Buran, Andrew Minton, Andrew Shooner, Bob Donderwinkel, Brendan Abbott, Brian Zerangue, Brien Wright, Christopher Clark, Craig Zheng, Dale Tan, David Hund, David Oliver, Doug Stewart, Fazal Khan, Frode Danielsen, Giulio Trico, Grzegorz Michlicki, Huib Keemink, Ida Engmark, Ingmars Lazdins, Jiri Vanmeerbeeck, Johanna Hörrmann, John Porter, Jonas Coch, Liam Egan, Mario Butera, Mark a.k.a. Ecko, Mark a.k.a. m165, Mark Lewis, Max Wheeler, Michael Eichelsdörfer, Nick Dunn, Nils Werner, Sandor Kerst, Simone Economo, Stephen Bau, Tony Arnold, Vlad Ghita and all of you who love and use Symphony and try to make it better every day.

I have an issue with this regarding the DS. All the fields from the subsection appear as 'Included elements':

images: title
images: date
...

But the SSM field itself doesn't appear, in this case 'Images'. It should have been:

images <-- the SSM field
images: title <-- subfields from subsection
images: date
...

Is this the intended behavior or a bug?

I my use case I need only the IDs of related entries.

This is intended behavior (but we can discuss the pros and cons). To get the related IDs, just output a parameter in your Data Source: this will give you a list of IDs in the pool.

In my use case I need only the IDs to cross-match them with another DS.

Think of a list of Team members and Skills.

Each Team member will have a range of Skills and these skills will be common across members. So instead of returning in XML the same Skills info for different members, I want to output only the IDs of Skills and cross match with a list of all Skills. Fewer DB querys.

Of course I can manually edit the DS to add the required field, but ... uhh :)

IMO it would make sense if the field would simply be there for selection.

Subsection Manager 2 caches all entries internally, so repetition shouldn't cause extra database queries.

Oh my ... Case closed then. Thank you for the info!

I tried setting up the Dynamic Text Group (DTG) extension as a field in a subsection. So far, I've found that SSM and DTG works quite well. But the problem that I have encountered involves having an empty Dynamic Text Group field in an entry. This appears to break the XML and no further entries will be output.

<error>Invalid argument supplied for foreach()</error>

Is this a problem with the Subsection Manager extension or the Dynamic Text Group extension?

Edit: We think we've tracked it down to this line in the SSM field.

That's a bit strange – what kind of output do you get when you put this statement before the foreach?

print_r(extension_subsectionmanager::$storage['fields'][$mode][$this->get('id'));

Ah. That's probably what it is.

Array ( [33] => Array ( [0] => formatted ) [37] => Array ( [0] => ) [41] => Array ( [0] => formatted ) )

The Dynamic Text Group extension should return null when there are no entries. Instead, it is returning an empty value.

Seems more like an error when parsing and caching the included fields for Subsection Manager. Hm ...

Is it possible that the error does not occur in the foreach you mentioned but in the next one a few lines below?

It's possible. We were just guessing.

I just tested this locally and cannot reproduce your issue. Which version of both extensions are you using?

Hmm. I'll see if there's anything odd about my set up. I have the latest installed for these extensions:

I pushed the new subsection manager and the website depends on getting @mode='raw' but the new subsection manager doesn't respect the mode setting. It sends @mode='normal' for both.

Any help would be greatly appreciated.

What's "@mode='raw'" and "@mode='normal'"?!

i recently removed a datetime field from a subsection and replaced it with regular old date. however, the fields are now out of order in the subsection manager. even after deleting and recreating the subsection manager field, nothing has changed.

have i missed a step?

edit: indeed i did. don't put it in the sidebar! ;)

edit: indeed i did. don't put it in the sidebar! ;)

Can you elaborate, please? Thanks!

Nils, I was able to track down where the error was occurring and it had to do with line 482 of the Dynamic Text Group extension. I'll move my discussion to the Dynamic Text Group extension thread.

Thanks, Stephen!

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