-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbootstrap.tpl.php
More file actions
42 lines (34 loc) · 898 Bytes
/
Copy pathbootstrap.tpl.php
File metadata and controls
42 lines (34 loc) · 898 Bytes
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
<?php
/* example to build a list of nodes with EntityFieldQuery() and show in bootstrap */
$query = new EntityFieldQuery();
$query
->entityCondition('entity_type', 'node')
->entityCondition('bundle', array('website'))
->propertyCondition('status', 1)
->propertyOrderBy('created', 'DESC');
$result = $query->execute();
$nodes = array();
if (isset($result['node'])) {
$nids = array_keys($result['node']);
$nodes = node_load_multiple($nids);
}
// todo: build the container management gui
$html = <<<END
<div>
<div class="page-header">
<h1>Website <small>containers on XXX</small></h1>
</div
</div>
<ul class="list-group">
END;
print $html;
foreach ($nodes as $node) {
print "Container name: <li class=list-group-item>$node->title</li>: "
//. $node->body['und'][0]['safe_value']
;
}
$html = <<<END
</ul>
END;
print $html;
?>