Created
February 3, 2016 16:31
-
-
Save seb-thomas/fd5c867819c7c1d426b6 to your computer and use it in GitHub Desktop.
Code for getting all field attr to entry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for fieldLayoutField in entry.getFieldLayout().getFields() %} | |
{# get the field Model from the fieldId #} | |
{% set field = craft.fields.getFieldById(fieldLayoutField.fieldId) %} | |
{# print the field handle and the field content #} | |
{{ field.handle | inspect }} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment