Let's talk 339.200.9090hello@delewis.com

Using the Reflection Field in Symphony CMS

The Reflection Field can be used to concatenate data from other fields into its field. The functionality of this extension itself is only limited by the creativity of the developer. I would like to share with you two common ways I use the extension to demonstrate its power.

  1. A better foreign key when using relationship fields such as the Select Box Link field.
  2. Better URL structure for data source filtering (thanks Nick).

Reflection Field in Symphony CMSAs I said before, its use is not limited to these two applications

Better Relationships

It’s only possible to use a single field to reference what you want to link to using the Select Box Link field. In addition, it is rare for a single field to provide the uniqueness required to identify an entry with certainty. Enter the Reflection Field.

The Reflection Field provides the ability to compose a primary key based on more than one field and act as the foreign key from the entry that is defining the relationship. For instance, if we were to link to a member, it would make sense to concatenate the First Name, Last Name, and E-Mail Address (assuming we had collected this data). First Name and Last Name both individually and combined are not unique. Using the E-Mail Address alone wouldn't be very user-friendly, But combining them all together provides a unique and user-friendly relationship.

Tip: The Reflection Field settings allow the option to hide the field from authors and administrators.

Better URL Structure

This idea was made apparent to me when I had a URL structure dilemma. There were basically two outcomes. The first outcome resulted in an SEO Friendly URL but breaks any expected hierarchy by the user.



If they visitor were to remove address from the end of the URL, it would make sense that businesses would then be listed by city. All of this information is necessary in order to filter a data source for an individual business. (so that there is only ever one business per URL) Having the business name first is good for SEO, but does not provide the expected hierarchy for power users. Once again, it's the Reflection Field to the rescue.

The solution is to concat the appropriate information and filter the data source by the Reflection field.



Additionally, a visitor wouldn't expect to be able to remove a portion of the URL unless display-name-city-state were removed in its entirety. Problem solved.

Tip: Take advantage of the XSLT Utility option if you need to do more than concatenate the field data.

How are you using the Reflection Field extension?

Posted on August 21, 2012 by Mark Lewis on and filed under Symphony CMS


Make geek like comment

© 2010–2018 All rights reserved. delewis