-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
38 lines (29 loc) · 1.02 KB
/
Copy pathsidebar.php
File metadata and controls
38 lines (29 loc) · 1.02 KB
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
<?php if(!defined('ROOTDOC')) die();?>
<?php
$arrSidebarWidgetNames = array();
$arrSidebarWidgetNames[] = 'latestArticles';
$arrSidebarWidgetNames[] = 'softwareDetails';
$arrSidebarWidgetNames[] = 'siegel';
$arrSidebarWidgetNames[] = 'genericTable';
$arrSidebarWidgetNames[] = 'flattr';
$arrSidebarWidgetNames[] = 'news';
//get all aside widgets
$arrAsideWidgets = $hcms->getAsideWidgets('sidebar');
//open aside-tag
echo '<aside id="sidebar" class="col-xs-12 col-md-5">';
//print all asideWidgets
foreach ($arrAsideWidgets as $asideWidget) {
if (in_array($asideWidget->getWidgetName(), $arrSidebarWidgetNames)) {
//handle AsdeWidgets with params
if ($asideWidget->getWidgetName() == 'latestArticles') {
echo $asideWidget->toString(array('imgWidth' => 470, 'imgHeight' => 200, 'imgScale' => true));
}
//handle all Aside Widgets without params
else {
echo $asideWidget->toString();
}
}
}
//close aside-tag
echo "</aside>";
?>