1

I have a question to access an array in fluid:

Associative Array {registrationProcess}
STRING  {fieldname} == 'firstName'
STRING  {property} == 'participant'
WORKING {registrationProcess.participant.{fieldname}}
WORKING {registrationProcess.{property}.firstName}
WORKING {registrationProcess.participant.firstName}
NULL    {registrationProcess.{property}.{fieldname}}

Why is the result of the last notation NULL???

1 Answer 1

3

Fluid currently only supports one dynamic property per level. Fluid 3.0 will change that but until that time, you have to extract the first dynamic expression to a variable and then perform the second dynamic expression on that new variable:

<f:variable
  name="registrationProperty"
  value="{registrationProcess.{property}}"
/>

{registrationProperty.{fieldname}}
Sign up to request clarification or add additional context in comments.

1 Comment

ThX for the hint... This is working {f:variable(name: 'slug', value: '{property}.{fieldname}')}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.