{* Component: content-field.html Description: Renders one field of a content entry (Indholdstyper) by its type Params: field - one item from $content_entry->getFields() or ->getListFields() (key, title, type, description, value, label) entry - the SafeContentEntry the field belongs to (used for [image index="1"] in rich text) variant - "block" (heading + value, default), "row" (table row) or "inline" (short "Title: value" line in a
<{$cf_value|escape|nl2br}>
<{/if}> <{elseif $cf_type == 'richtext'}> <{if $cf_variant == 'inline'}> <{$cf_label|truncate:140|escape:'html':'UTF-8':false}> <{else}> <{include file="components/wysiwyg.html" content=$cf_value template=$entry}> <{/if}> <{elseif $cf_type == 'image'}> <{if is_object($cf_value)}>| <{$cf_sub_field.title|escape}> | <{/foreach}>
|---|
|
<{if is_object($cf_cell_value)}>
<{include file="components/image.html" image=$cf_cell_value product="" width="80" height="80" class="product-card-list__picture" object_fit="cover" padding="none"}>
<{elseif is_array($cf_cell_value)}>
<{foreach $cf_cell_value as $cf_part}><{$cf_part|escape}><{if !$cf_part@last}>, <{/if}><{/foreach}>
<{elseif is_string($cf_cell_value) && ($cf_cell.type == 'richtext' || (!$cf_cell.type && preg_match('/<[a-z][^>]*>/i', $cf_cell_value)))}>
<{$cf_cell_value}>
<{else}>
<{$cf_cell_value|escape|nl2br}>
<{/if}>
|
<{/foreach}>