Search

Hello everyone!

Newbie question here:

I’ve a section with a select box link field linked to another section which has two different fields (field 1 and field 2).

How can I achieve that when I select a value from field 1 in the select box link field, it returns not only that value but also the one of field 2?

alt text

For example, I’ve a section called projects and I would like to link to each project the author name and surname (which are “stored” in a different section) using only one select box link to select the name and automatically the related surname (unfortunately I’m not allowed to put both name and surname within the same field). Is it possible?

If not, can you help me and give me some tips on how to achieve it, please?

Thank you very much!

One way would be to use the Reflection Field in the author section to dynamically combine the first and last name. That’s how I’ve solved it in the past.

Try using the Reflection Field. I think it describes the exact use case that you are asking about.

Edit: Too slow. Craig beat me to the answer.

Whoa! The fastest answers in the West! Many thanks for the help!

Yep Reflection is perfect for this. I’ve had a similar example where I’ve have sections Fixtures and Match Reports (for a sports club). When adding a Match Report the “Fixture” dropdown (Select Box Link) uses a Reflection field in the Fixtures section which concatenates the fixture date, team name and venue, so make it a clearer selection in the match report.

Yes, I’ve configured the Reflection and Select Box Link fields as you’ve done Nick and they work perfectly.

Taking this scenario a step further, imagine I have a section with three fields:

Section: Exterior Fields: 1. Color 2. Material 3. Color-Material (a Reflection Field)

And then I have another section that uses the Reflection field as the Dynamic Source of a Select Box that permits multiple selections:

Section: Homes Fields: 1. Manufacturer 2. Style 3. Exterior (Dynamic from Exterior::Color-Material)

When I return my data for a Home, I want to print a list of Colors under Material headings, instead of the concatenated Color-Material field values, for instance:

Vinyl: White, Grey, Black, Brick, Brown Aluminium: White, Brown, Green Composite: White

Instead of: White-Vinyl, Grey-Vinyl, Black-Vinyl…Green-Aluminium, White-Composite

How can I retrieve the other values from the Exteriors section? Is this a second data source that needs to be created? Or can I somehow pull the values of all the fields together?

If it’s not obvious, I’m new to Symphony. Additionally, I’m only interested in getting XML out at this point, and the only XSL I’m using is:

<xsl:copy-of select="data"/>

Edit: Looks like the solution to my problem is Data Source Chaining, if I find a good link I’ll post it for the next noob. I’m hoping to find a good forum thread on the topic, the docs start here:

Data Source Chaining

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