@@ -23,7 +23,11 @@ class ContentType { | |||
$this->href= $f3->get('SITE_URL').str_replace($f3->get('CONTENT'),"",$this->config['path']); | |||
foreach ($this->keys as $k=>$v) { | |||
$this->values[$v] = $keys[$k]; | |||
if (array_key_exists($k, $keys)) { | |||
$this->values[$v] = $keys[$k]; | |||
} else { | |||
$this->values[$v] = ''; | |||
} | |||
} | |||
$ke = explode("/",$this->config['path']); |
@@ -408,11 +408,24 @@ class FilesInFolders { | |||
} | |||
break; | |||
case 'CE': | |||
switch($request[1]) { | |||
case 'publication': | |||
$CE = new \Modules\CPublication($this->config,['path'=>$this->folder]); | |||
if(count($request)>2) { | |||
$CE->set_layout($request[2]); | |||
} | |||
$new = $CE; | |||
break; | |||
} | |||
break; | |||
case 'TOC': | |||
// throw away TOC part of request, we don't need it | |||
array_shift($request); | |||
$toc = new \Modules\TOC($request,$this->folder,$body); | |||
$toc->dispatch(); | |||
$new=sprintf("<div class=\"TOC %s\">%s</div>", | |||
array_shift($request), | |||
$toc); |
@@ -73,6 +73,10 @@ class TOC { | |||
case 'concerts': | |||
$this->load('\Modules\CConcert'); | |||
break; | |||
case 'publication': | |||
case 'publications': | |||
$this->load('\Modules\CPublication'); | |||
break; | |||
} | |||
} | |||
@@ -97,7 +101,7 @@ class TOC { | |||
function apply_filters() { | |||
foreach($this->elements as $k=>$v) { | |||
$show = true; | |||
if (count($this->filters['must_have'])) { | |||
if (array_key_exists('must_have', $this->filters) && count($this->filters['must_have'])) { | |||
$show = false; | |||
foreach ($this->filters['must_have'] as $l=>$w) { | |||
$ke = array_keys($w); | |||
@@ -118,7 +122,7 @@ class TOC { | |||
} | |||
} | |||
} | |||
if (count($this->filters['must_not_have'])) { | |||
if (array_key_exists('must_not_have', $this->filters) && count($this->filters['must_not_have'])) { | |||
foreach ($this->filters['must_not_have'] as $l=>$w) { | |||
$ke = array_keys($w); | |||
$key = $ke[0]; |
@@ -6,7 +6,7 @@ | |||
</div> | |||
</check> | |||
<check if="{{ @logo }}"> | |||
<check if="{{ isset(@logo) }}"> | |||
<true> | |||
<a href="{{ @SITE_URL }}/"><h1> | |||
<img src="/{{ @logo }}" alt="{{ @title }}" /> |