forked from ding2/ting_fulltext
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ting_fulltext_view.tpl.php
45 lines (40 loc) · 1.08 KB
/
ting_fulltext_view.tpl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* @file
* Template to render full text object.
*/
?>
<div class="ting_fulltext_wrap">
<h3>
<?php if (isset($element['title'])):
echo $element['title'];
endif; ?>
</h3>
<div class="ting_fulltext_name">
<?php if (!empty($element['firstname'])):
echo '<b>Forfatter:</b>';
echo $element['firstname'] . ' ' . $element['surname'];
endif; ?>
</div>
<?php if (isset($element['subject'])):
echo '<div class="ting_fulltext_subject">' . t('subject:') . '</div>';
foreach ($element['subject'] as $key => $subject):
echo '<div class="ting_fulltext_subjectitem">' . $subject . '</div>';
endforeach;
echo '</div>';
endif; ?>
<?php
if (isset($element['section'])):
foreach ($element['section'] as $key => $section):
if (isset($section['title'])):
echo '<h4>' . $section['title'] . '</h4>';
endif;
if (isset($section['para'])):
foreach($section['para'] as $para):
echo '<p class="ting_fulltext_para">' . $para . '</p>';
endforeach;
endif;
endforeach;
endif;
?>
</div>