Added getting site config from DB

This commit is contained in:
Deon George
2011-09-29 17:13:32 +10:00
parent b6802e4b5d
commit 147d035e46
6 changed files with 77 additions and 40 deletions

View File

@@ -13,7 +13,7 @@
class lnApp_HeadImages extends HTMLRender {
protected static $_data = array();
protected static $_spacer = ' ';
protected static $_required_keys = array('url','img');
protected static $_required_keys = array('img');
/**
* Return an instance of this class
@@ -35,7 +35,10 @@ class lnApp_HeadImages extends HTMLRender {
foreach (static::$_data as $value) {
$i = HTML::image($mediapath->uri(array('file'=>$value['img'])),array('alt'=>isset($value['attrs']['title']) ? $value['attrs']['title'] : ''));
$output .= HTML::anchor($value['url'],$i,(isset($value['attrs']) && is_array($value['attrs'])) ? $value['attrs'] : null);
if (isset($value['url']))
$output .= HTML::anchor($value['url'],$i,(isset($value['attrs']) && is_array($value['attrs'])) ? $value['attrs'] : null);
else
$output .= $i;
$output .= static::$_spacer;
}