Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4483 broke select_var:label #4574

Closed
philipboomy opened this issue Oct 25, 2021 · 2 comments · Fixed by #4688
Closed

4483 broke select_var:label #4574

philipboomy opened this issue Oct 25, 2021 · 2 comments · Fixed by #4688
Assignees

Comments

@philipboomy
Copy link

Bug description

I think this update/pr #4483 broke the :label as per docs here. Before updating I could output label now I get key value.

How to reproduce

Create a select field and try to output the label

Logs

No response

Versions

Statamic 3.2.17 Pro
Laravel 8.64.0
PHP 7.4.21

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@jasonvarga
Copy link
Member

Can you please show the data in the md file, the select field in the blueprint yaml file, and the template code where you're using it.

@philipboomy
Copy link
Author

philipboomy commented Oct 25, 2021

MD

type:
  -
    navn: Jordbær
    virkning:
      -
        a_virkings_procent: '1'

Fieldset

title: 'Virknings Info'
fields:
  -
    handle: virkings_procent
    field:
      options:
        1: 'Over 90% virkning'
        2: 'Bedre enn 75% - 89% virkning'
        3: '75 - 89% virkning'
        4: 'Bedre enn 50% - 74% virkning'
        5: '50 - 74% virkning'
        6: 'Under 50% virkning'
      multiple: false
      max_items: 1
      clearable: false
      searchable: true
      taggable: false
      push_tags: false
      cast_booleans: false
      display: 'Virkings Procent'
      type: select
      icon: select
      listable: hidden
      instructions_position: above
      width: 50

Template code

 {{ type }}
    {{ virkning }}
      {{ a_virkings_procent:label }}
    {{ /virkning }}
{{ /type }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants