Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {{ entry.matrixField.type('copy').nth(0).plainText }}
- {% if craft.request.isLivePreview %}
- {% set firstCopyBlock = null %}
- {% for block in entry.matrixField %}
- {% if firstCopyBlock == null and block.type.handle == 'copy' %}
- {% set firstCopyBlock = block %}
- {% endif %}
- {% endfor %}
- {% else %}
- {% set firstCopyBlock = entry.matrixField.type('copy').first() %}
- {% endif %}
- {% if firstCopyBlock %}
- {{ firstCopyBlock.plainText }}
- {% endif %}
- {% if craft.app.request.isLivePreview %}
- {% set firstCopyBlock = null %}
- {% for block in entry.matrixField.all() %}
- {% if firstCopyBlock == null and block.type.handle == 'copy' %}
- {% set firstCopyBlock = block %}
- {% endif %}
- {% endfor %}
- {% else %}
- {% set firstCopyBlock = entry.matrixField.type('copy').one() %}
- {% endif %}
- {% if firstCopyBlock %}
- {{ firstCopyBlock.plainText }}
- {% endif %}
Add Comment
Please, Sign In to add comment