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

Search

Hi.

Let’s say I have a section A which stores a link to section B and a link to section C (sections B and C are unaware of section A).

I create a datasource that selects everything from section A, does this automatically join all the related section fields or will i need seperate data sources to pull the related section fields?

And if i need additional datasources, since I can only output 1 parameter from a datasource, how would i access the values i need in the original datasource?

Am I approaching this in the wrong way?

Cheers

Toby

I create a datasource that selects everything from section A, does this automatically join all the related section fields or will i need seperate data sources to pull the related section fields?

You’ll need a separate Data Source for each section. If Symphony automatically joined then things can get inefficient pretty quickly. So this is where you’d use Output Parameter chaining (taking the param from Data Source A and using it as a filter in Data Source B).

And if i need additional datasources, since I can only output 1 parameter from a datasource, how would i access the values i need in the original datasource?

This is an unfortunate limitation. If you need to get the values of both Select Box Link 1 and Select Box Link 2 in the param pool, you’ll need to create two Data Sources (one for each Output Parameter), and duplicate the filters so the two DSs are essentially identical save for the Output Parameter selection.

I’ve asked the core team to put multiple output parameters on the to-do list as it would save a lot of DS duplication, but I doubt this will make Symphony 2.0.7 or 2.1.

Hi.

Thanks for the info nick, I understand that auto-joins could be a killer.

You might be interested that I’ve got multiple output parameters working on my version now though.

I first modded the datasources admin page to offer an ‘All’ option under Parameter Ouput, then modded the core datasource.section.php to check for this option and if set, include all fields as output parameters using a base key.

So now, when ‘All’ is selected, 3 core output parameters will always be created:

$ds-<section-handle>-system-id
$ds-<section-handle>-system-date
$ds-<section-handle>-system-author

and then each field is output using a dynamic key:

$ds-<section-handle>-<field-handle>

It’s all or nothing at the moment (no multi-select or anything) but only took 20 minutes and initial tests are quite promising, not tried on large datasets but this is purely for small sets of highly linked data so shouldn’t cause a problem.

Once I’ve tested this thoroughly I’ll post the mods in case anyone is interested.

Cheers

Toby

I’ve asked the core team to put multiple output parameters on the to-do list as it would save a lot of DS duplication, but I doubt this will make Symphony 2.0.7 or 2.1.

It’s in 2.1.

thanks for letting me know czheng, i’ll just use my implementation until then.

t.

Sweet! I’ve said it before, but I did manage to implement this myself but the pull was never accepted by Alistair. The last hurdle was to change the way DS dependencies work, since at the moment only dependencies in the form $ds-{root_element} are recognised.

It’s in 2.1.

Awesome, thanks.

It’s in 2.1.

In 2.2.5, the datasource editor uses a select allowing selection of only one output parameter. Is there a way to have Symphony handle this?

Not to sound similar to previous comments, but, it's in 2.3 ;o)

:D Good to know.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details