Search

I know this has been referenced elsewhere on the forum (http://symphony21.com/forum/discussions/519/1/#position-7), but I couldn't find an answer.

So, is it currently possible for a Symphony 2.x extension to create a 'type' of datasource (e.g. such as "Dynamic XML" and "Static XML") so that the end user can create as many instances as they like?

See, I'm creating an extension (will be on GitHub in due course) that allows Symphony to easily display media managed with an external application. The external application groups media into albums, and it's very likely that you'd want to display more than one album on a given Symphony site. So, rather than simply creating a datasource, I'd like to create a type of datasource, of which the user can then create as many instances as they like—one for each album in the external application.

Any ideas?

Oh, and of course: if this isn't currently a feature, consider it a humble request. :)

Unfortunately you cannot easily create data source types, yet. In Symphony 3, all field types, event types and data source types will be extensible - in fact, all of the existing types found in the core will be extensions themselves.

Thanks, that's what I thought.

Symphony 3 sounds great! I thought Symphony was fantastically flexible as it was (even at v1.7), but it's just getting better and better. Thanks again!

You guys are such teases ;)

Yeah, you said it! :)

I really didn't like the idea of just creating one datasource for my extension though; what if someone wants to put 5 different albums on their site, each with 1000 images or so? You'd end up serving 5000 images-worth of XML!

Fortunately, I think I've had a better idea, but it's more work so I wanted some opinions before I get started.

The idea is that the extension would create its own datasources at run-time, just like Symphony. Users would navigate to a page within the admin section (probably under Blueprints) and create as many datasources as they needed (for different albums, filters, etc.) These datasources would then be saved as PHP files within the workspace (as they're site-specific) and (the hope is) displayed and used by Symphony. A complete feature set would be to list the existing datasources and allow the user to edit/remove them too (this is probably out-of-scope for now).

So does this seem like a good idea? I'd also like some confirmation that it's possible, if anyone knows.

Thanks again for all your help! :)

Yes, the idea is good. I would have the extension generate the customised data sources and put them in the same directory as other data sources (and set editable to off).

Awesome, thanks!

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