Fluid and translation · Question 1 of 12

How do you output the value of the title property of the product object in a Fluid template?

1 answer is correct. Easy

Show answer

Answer

  • B {product.title}

Explanation

In Fluid you write variables in single curly braces, and you reach object properties and array keys with a dot: {product.title}. For an object, Fluid calls the getter getTitle(). The output is HTML-escaped automatically, so special characters such as < are displayed safely and injected HTML code is not executed. Double curly braces come from Twig or Mustache and have no meaning in Fluid; PHP syntax such as $product->title is not possible in templates.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications