<?php
/**
 * Template name: Homepage V3
 *
 * This is the most generic template file in a WordPress theme and one of the
 * two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * For example, it puts together the home page when no home.php file exists.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage classiera
 * @since classiera 1.0
 */
get_header(); ?>

<?php 
	$page = get_page($post->ID);
	$current_page_id = $page->ID;
	$page_slider = get_post_meta($current_page_id, 'page_slider', true); 

	global $redux_demo;	
	$homeLayout = $redux_demo['opt-homepage-layout-v3']['enabled'];
?>
<?php 
if ($homeLayout):
	foreach ($homeLayout as $key=>$value) {
 
			switch($key) {
		 
					case 'banner': get_template_part( 'templates/slider/imageheader' );
					break;
					
					case 'layerslider': get_template_part( 'templates/slider/slidermap' );
					break;
					case 'categories': get_template_part( 'templates/category/catstyle3' );
					break;	
			 
					case 'premiumslider': get_template_part( 'templates/homev3/psection' );    
					break;  
					
					case 'partners': get_template_part( 'templates/homev3/company' );
					break;
					
					case 'customads': get_template_part( 'templates/customads' );
					break;
					
					case 'advantage': get_template_part( 'templates/homev3/advantage' );    
					break; 
					
					case 'callout': get_template_part( 'templates/callout/style3' );    
					break;
					
					case 'advertisement': get_template_part( 'templates/adv/advstyle3' );    
					break;
					
					case 'counter': get_template_part( 'templates/homev3/counter' );    
					break;
					
					case 'packages': get_template_part( 'templates/homev3/planssection' );    
					break;
					
					case 'twitter': get_template_part( 'templates/homev3/tweets' );    
					break;
				}			 
			}		 
	endif;
?>



<?php get_footer(); ?>