Skip to content

Commit

Permalink
Output image using record.image
Browse files Browse the repository at this point in the history
  • Loading branch information
nestordedios committed Oct 6, 2017
1 parent bd21fb7 commit 0613d85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions record.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
<h1>{{ record.title }}</h1>
</header>

{% set fieldtype = record.fieldtype('image') %}
{% set value = record.get('image') %}
{{ block('common_fields', 'partials/_sub_fields.twig') }}
{% if record.image is not empty %}
<span class="image main">
{{ record.image|showimage('1154', '375') }}
</span>
{% endif %}

{# Output all fields(excluding image field already output before) in the order as defined in the contenttype.
To change the generated html and configure the options, see:
Expand Down

0 comments on commit 0613d85

Please sign in to comment.