Search

I've got 10 sections. All sections got a reference link field for related pages from all those sections.

What is the best practice to get the data from the related entries?

  1. Data source chaining, but I guess I have to make 100 data sources that way.
  2. 10 data sources from all the entries (around 150-300 entries) with the necessary fields and make the filter in the template.
  3. Another option?

Can you please elaborate a bit more on your section structure? I didn't really understand how they are related to each other.

Datasource chaining will do it, in less DS's than you might think.

If the setup is, Section {A,B,C} => Pages section, then all you need to do it output the Reference Link's value on your datasources for Section A,B or C. To get the page's data, you'll create one datasource for the Pages section, and have it filtered on the multiple different output parameters from your Section A, B or C, eg {$ds-a.related-page:$ds-b.related-page:$ds-c.related-page}

If it's the other way around so Pages => Section {A,B,C}, then you can use Union Datasource to make you're job a little easier. Create the multiple DS's, but then just reference them by one Union Datasource. Let this do the hard dependancy work.

I've done both ways with success, it just depends on the backend workflow as to which one can work for you :)

The typical structure of my sections are for each main subject a section for categories and a section for articles (in this case there are 5 main subjects: about us, our services, industries, target groups, faq).

The site structure will be: a category page with an introduction text and an overview of all the articles in that category. And article pages.

All pages (category and articles) got a sidebar with an 'Also interesting' list which consist of a title, teaser text and link to the full article. The client can choose from all entries in all sections through a reference link field for the "Also interesting" list.

Now I can choose to make use of an output parameter for the reference link field and I make seperate datasources which are filtered based on that parameter (data source chainging) or I make seperate datasources for each section (with title, teaser and link) and I filter in the template with [current()/@id = @id].

For the first option I have to make 10 output parameters (for each subject a category and article section) which I have to use on all sections to make the desired data sources (10 output parameters for 10 sections are 100 datasources).

For the second option I have to make 10 datasources which will contain all entries (around 150-300 entries).

I wonder what the impact is on performance for both options or maybe there is a better option to make the "also interesting' list.

@brendo Ok, of course I can filter with multiple parameters (ds filter documentation) on one field. That way I only have to make the parameters and probably an union datasource to limit the datasources.

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