File: /var/www/vhosts/creativefellows.nl/test.creativefellows.nl/ergatis/pages/page.actueel.php
<?php
/*
* Qutes page
*/
require_once ROOT_DIR . 'pages/sections/section.qoutes.php';
/*
* Breadcrumbs
*/
require_once ROOT_DIR . 'pages/sections/section.breadcrumbs.php';
//echo '...'.$category;
/*
* Contents
*/
$html = '<div class="col17 sub-grid">';
/*
* View item
*/
if(count($e) == 1 && $category != "sociale media")
{
$html .= $e[0]->content;
/*
* downloads
*/
$html .= $cassette->getFilesAsList($e[0]->downloads,'<h3>Downloads</h3>',"downloads","col24");
//Vervolgacties
require_once ROOT_DIR . 'pages/sections/section.vervolgacties.php';
$html .= $acties;
/*
* Contact form
*/
if($e[0]->form_id)
{
$form_id = $e[0]->form_id;
$hide_header = true;
require_once 'sections/section.form.php';
$html .= '<div class="col24">'. $return .'</div>';
}
}
else
{
$html .= '<div class="col24">';
// load category
if($category != null)
{
$html .= '<h1>'. $cassette->dp_cap($category) .'</h1>';
/*
* Get twitter section in UL
*/
if(preg_match("/sociale media/i", $cassette->dp($category) ))
{
$tweet_count = 20;
$hide_more = true;
include_once ROOT_DIR . 'pages/sections/section.twitterfeed.php';
$html .= $twitter_html;
}
else
{
$html .= '<ul class="link-list">';
foreach($e as $i => $p)
{
$field_name = $p->first_field;
$html .= '<li><a href="'. $p->entry_link .'">'. $p->$field_name .'</a></li>';
}
$html .= '</ul>';
}
}
else
{
$html .= '<h1>'.$section.'</h1>';
$has_categories = $cassette->getCategories($section,$post_name);
foreach($has_categories as $block)
{
if(preg_match("/sociale media/i",$block["naam"]))
{
/*
* Get twitter section in UL
*/
$tweet_count = 5;
include_once ROOT_DIR . 'pages/sections/section.twitterfeed.php';
$html .= '<h3>'. $block["naam"] .'</h3>';
$html .= $twitter_html;
}else{
$pages = $cassette->entriesInCategory($block["category_id"]);
if(count($pages) > 0)
{
$html .= '<h3>'. $block["naam"] .'</h3>';
$html .= '<ul class="link-list">';
foreach($pages as $i => $p)
{
if($i > 5) continue;
$field_name = $p->first_field;
$html .= '<li><a href="'. $p->entry_link .'">'. $p->$field_name .'</a></li>';
}
if(count($pages) > 5) $html .= '<li><a href="'. $section .'/'. $block["naam"] .'" class="more">Overige berichten</a></li>';
$html .= '</ul>';
}
}
}
}
$html .= '</div>';
}
$html .= '</div>';
/*
* Sidebar
*/
require_once ROOT_DIR . 'pages/sections/section.sidebar.php';
$html .= '<div class="col6 offset1 sidebar">';
$html .= $sidebar;
/*
* custom sidebar
*/
if(!empty($e) && $e[0]->sidebar) $html.= '<div class="custom-sidebar"><div class="custom-sidebar-wrapper">'. $e[0]->sidebar .'</div></div>';
//else{
// require_once ROOT_DIR . 'pages/sections/section.fdgazelle.php';
//}
$html .= '</div>';
/*
* Output HTML
*/
echo $cassette->wrapAsSection($html);
/*
* two column details + vervolgacties
*/
require_once ROOT_DIR . "pages/sections/section.related_info.php";
?>