Search

This could well be a dumb question. Thought I’d throw it out there anyway :)

I’ve found myself getting a little confuzzled recently with a few things in Symphony and woke up today asking myself this question.

If anyone has the time to shed some light on this subject (or explain to me how I’m thinking about Symphony all wrong) that’d honestly be a great help.

I don’t know, but you can create multiple data sources pulling from the same section and then add all of them to the same page.

I can’t speak to the behind-the-scenes mechanics, only usage. You can think of a datasource like a query on a database table (the section). Since its so tightly-coupled to the section, it leads to creating several datasources for the different data outputs you want from a section. For instance, you’ll have 1 DS that outputs a list of all entries in a section, then another that outputs all fields of a specific entry. You’ll then might reuse this datasource in different contexts in your site.

That is not to say that it could be useful to have a ‘composite’ datasource. In fact, last time I checked, Symphony 3 will include the ability to use another page (called ‘views’ in v3) as a datasource. This means you’ll be able to tailor such a composite datasource to your specific needs. (see below)

For now, I think creating datasources is a good conceptual practice, since it leads you to ask “What are all the views of this section I’ll need, and how few datasources can I abstract these views into?”

Thanks for the feedback guys.

Guess I’ve recently found myself thinking of datasources along the lines of a more general database query and not conceptually locking them to the sections they feed from.

The concept of ‘Views’ coming in v3 sounds damn fine. Although its name does remind me of Drupal *cough* :)

Views is just a term that replaces the inaccurate-and-potentially-misleading Pages. It functions the same, for the most part.

Andrew, the ‘Views’ DS type is just the old ‘Navigation’ DS type renamed. What the DS does is fetch Views, so it was a bit presumptuous for us to call it ‘Navigation’.

Hope that clarifies.

Andrew, the ‘Views’ DS type is just the old ‘Navigation’ DS type renamed. What the DS does is fetch Views, so it was a bit presumptuous for us to call it ‘Navigation’.

Well, I gotta say that’s disappointing. I did a little dance when I saw that & thought it was as I described. Throw that one on the extension idea pile…

What exactly do you mean by “use another page as a DS”?

@ashooner I have toyed with a concept of using MySQL views to create datasources across multiple sections but it’s never left my notepad unfortunately. S3 would make it easier to accomplish (with the Datsource types as extensions), but I think the core logic to work with views would be similar, if not the same between S2 and S3.

I should have a look at actually implementing it one of these days.

I mean having the output of one page/view transformation delivered as a datasource for another. I used to do this the long-way-round by adding a page as a dynamic DS, and having the server actually make an http request to itself (which is of course very inefficient).

I see. Yeah, I’ve done it the same way as you have in the past. With Symphony 3, developing an extension that provides this type of DS should be fairly simple.

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