Jump to content

Pages select field: how to get the key in database


Recommended Posts

I am using select field type in Pages to store in the database integers from 0 to 5 as a rating system.

How do I get this values in the template. I am trying something like this:

{{if $record->$field_165 == 0}}
{$estrela_0|raw}
{{elseif $record->$field_165 == 1}}
{$estrela_1|raw}
{{elseif $record->$field_165 == 2}}
{$estrela_2|raw}
{{elseif $record->$field_165 == 3}}
{$estrela_3|raw}
{{elseif $record->$field_165 == 4}}
{$estrela_4|raw}
{{elseif $record->$field_165 == 5}}
{$estrela_5|raw}
{{endif}}

What I need is the content stored on the database for the field_165.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...