Search

Hello,

how I can create custom datasource? I have (i.e. I can choose between) multiple XML files or one SQLite database and I want to create a datasource to fetch rows / nodes filtered by page params.

So, how to start? I need to extend the datasource class and implement some methods, but what methods?

-- Miika

This API reference page might help you get started to understand what's going on under the hood.

Also might be worth checking out the code on http://github.com/symphonycms/symphony-2 for reference to the datasource code.

EDIT

Also if it's customising a DataSource once it's been created: John @designermonkey did something a while back to generate a DataSource from a CSV file, so maybe there are some hints to help you along there too. The code is a little dated so may not work with Symphony 2.3.1 latest release.

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