Search

When creating a Data Source Extension, how do i let the user choose the Included Elements? (just like a Data Source from a Section)

Is there a way to edit it in the datasource editor page? I tried to use allowEditorToParse() {return true;} but it didn't work.

Do i have to put the options in the Symphony::Configuration?

I think you'll need to duplicate symphony/lib/toolkit/data-sources/datasource.section.php to suit your needs.

Do you mean to extend the Section class? Can you explain more about this? This is my first extension.

Isn't the sections used for information stored in the db? My ds is going to retrieve information from the client headers.

Does the Server Headers extension do what you need?

Thanks Brendo, but i'm using the MobileESP for detecting devices. There are lots of methods for detecting devices.

I want the developer to be able to choose what he needs. Do i have to do it from the Symphony::Configuration or this DS can be edited in the datasource editor page?

Settings like included fields or filters are usually saved in the PHP file of that DS itself (see all those files in workspace/data-sources/).

I wouldn't recommend doing the same on an extension-DS (afaik they're in extensions/your_extension/data-sources/) as no files outside workspace/ are supposed to have installation-specific changes at all.

So yeah, the Symphony::Configuration sounds like a good place to put those parameters.

So i'll try this. Thank you very much Phoque. Thanks for all the answers guys!

Sorry, I misunderstood.

Also, since your DS won't select from your Sections, the PHP will be quite different from the "native Section" ones. All those fields and parameters won't be necessary but you will have to build the XML yourself.

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