Search

Hello to all.

I'm brand new here and find Symphony and the community to be exceptional.

First off, I'd like to apologize for sparking yet another thread on this topic. However, I've poured through all the similar threads I could find and I'm still stuck. Going in circles. Page, Components, Section...etc.

Here's what I'm trying to achieve. Using spectrum as a base, I'm trying to add an Author's Profile with bio and pic, to each article.

I don't wish to use the system's author because in this app, article authors won't be logging in.

Here are the steps I've followed from the various forum posts on ds chaining.

I've added a Select Box Link field to the Article section.

I've created a section named Author Profiles.

I've created a data source named Profile with Author Profiles as source. In this DS, I've set Parameter Output to System ID. Also, I've included the elements of the profile that I want to show.

In the Articles page settings, I've added Profile to the list of data sources.

So far so good. I've got ds-profile showing in my list of params. However, all the profiles are showing at once on in the xml.

How do I filter the for the profile chosen for the particular article?

Within the Profile datasource, I've tried filtering with {$ds-article} to no avail. <error>No records found.</error>

What am I missing? Any help would be greatly appreciated.

You've got chaining wrong, but it's quite simple to fix!

If I understand your question correctly, you want the Profiles ds to only output the Author profile associated with the current article. So, first of all, this ds must be filtered by some value, otherwise it would return all the entries, as it is doing now.

The parameter output shouldn't be set on the Profiles ds but on the ds pulling articles (which I guess is Article in the default ensemble). If you set the parameter output of the Article ds to be the select box link field linked to the Profiles section, it will hold the id of the author associated with that Article.

Guess the missing step? Now that you have the profile id in the param pool (check with ?debug it should be something like $ds-article) you can use it to filter by system:id the Profiles datasource.

It's all very simple yet very powerful, hope I've explained it so that you can understand what's going on ;)

That was it. Thank you very much.

Also, this article is very helpful on this.

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