div around fields and static fields at top, for orgs and cases
This commit is contained in:
@ -20,11 +20,5 @@ use Drupal\Core\Render\Element;
|
||||
* - attributes: HTML attributes for the containing element.
|
||||
*/
|
||||
function template_preprocess_oc_organisation(array &$variables) {
|
||||
// Fetch OCOrganisation Entity Object.
|
||||
$oc_organisation = $variables['elements']['#oc_organisation'];
|
||||
|
||||
// Helpful $content variable for templates.
|
||||
foreach (Element::children($variables['elements']) as $key) {
|
||||
$variables['content'][$key] = $variables['elements'][$key];
|
||||
}
|
||||
_template_preprocess_entity($variables);
|
||||
}
|
||||
|
@ -16,7 +16,10 @@
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes.addClass('oc_organisation') }}>
|
||||
{% if content %}
|
||||
{{- content -}}
|
||||
{% if normal_fields %}
|
||||
<div id='static_data'>{{- normal_fields -}}</div>
|
||||
{% endif %}
|
||||
{% if extra_fields %}
|
||||
<div id='dynamic_data'>{{- extra_fields -}}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user