-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpatient_resources_home.php
82 lines (73 loc) · 2.58 KB
/
patient_resources_home.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
$showchildren = "n";
$showsiblings = "n";
$titleoverride = "";
include("./inc/head.php");
?>
<div class="row">
<div class="col-sm-12">
<div class="content-space content-border">
<h2 class='page-title'><?=$page->title; ?></h2>
<span class='bodytext'><?=$page->body; ?> </span>
<?php
$key = 0;
if(count($page->repeat_callout_promote)) {
echo "<div class='row padding-top-md'>";
foreach($page->repeat_callout_promote as $match) {
$i++; // Increments the key
$temprow = ($i % 2 == 1 ? 'clear-left' : ''); // adds this class to the 3rd
if($match->relate_page->url) {
$tempval = $match->relate_page->url;
} else {
$tempval = $match->url_website;
}
if($match->image){
$img_sized = $match->image->size(300,300);
$img_src = "<div class='col-xs-4'><a class='' href='{$tempval}'><img src='{$img_sized->url}' class='img-responsive thumbnail' alt='{$img_sized->title}' /></a></div>";
}
echo "<div class='col-sm-6 col-xs-12 {$temprow} padding-bottom-md'>
{$img_src}
<div class='col-sm-8'>
<a class='' href='{$tempval}'><h3 class='headingtight margin-top-sm'>{$match->label}</h3> </a>
<p class=' hidden-xs text-sm text-muted'>{$match->summary}</p><a class='btn btn-sm btn-default' href='{$tempval}'>Access »</a>
</div>
</div>
";
}
echo "</div>";
unset($i);
unset($temprow);
}
?>
<h2 class='page-title'>Additional Resources</h2>
<?php
$key = 0;
if(count($page->repeat_callout)) {
echo "<div class='row padding-top-md'>";
foreach($page->repeat_callout as $match) {
$i++; // Increments the key
$temprow = ($i % 2 == 1 ? 'clear-left' : ''); // adds this class to the 3rd
if($match->relate_page->url) {
$tempval = $match->relate_page->url;
} else {
$tempval = $match->url_website;
}
if($match->image){
$img_sized = $match->image->size(300,300);
$img_src = "<div class='col-xs-4'><a class='' href='{$tempval}'><img src='{$img_sized->url}' class='img-responsive thumbnail' alt='{$img_sized->title}' /></a></div>";
}
echo "<div class='col-sm-6 col-xs-12 {$temprow} padding-bottom-md'>
{$img_src}
<div class='col-sm-8'>
<a class='' href='{$tempval}'><h4 class='headingtight'>{$match->label}</h4> </a>
<p class=' hidden-xs text-sm text-muted'>{$match->summary}</p><a class='btn btn-sm btn-default' href='{$tempval}'>Access »</a>
</div>
</div>
";
}
echo "</div>";
}
?>
</div>
</div>
<? include("./inc/foot.php");