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

Search

I have a very simple section for People, with both a 'First Name' and a 'Last Name' field. When I'm creating another section to reference the People section using a 'Select Box Link' field, I would like to be able to concatenate the 'First Name' and 'Last Name' fields to provide the selectable value.

Is there a good way to do this?

I apologise if this is a question with an obvious answer, I'm only recently getting back into Symphony & XSLT and I appear to have forgotten most of it in the 4 years since I last touched it.

Yep, give the Reflection Field a try. Add it to the People section and give it a value of something like:

concat(entry/first-name,' ',entry/last-name)

And set it to hidden, so it's not visible on the People form.

Fantastic.

I couldn't get concat to work inside the Reflection Field's value, but the value below worked fine.

{entry/first-name} {entry/last-name}

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