<?php
/**
* The main template file.
*
* @package Betheme
* @author Muffin group
* @link http://muffingroup.com
*/
//!!get_header();
// Class
$blog_classes = array();
$section_class = array();
// Class | Layout
if( $_GET && key_exists('mfn-b', $_GET) ){
$blog_layout = $_GET['mfn-b']; // demo
} else {
$blog_layout = mfn_opts_get( 'blog-layout', 'classic' );
}
$blog_classes[] = $blog_layout;
// Layout | Masonry Tiles | Quick Fix
if( $blog_layout == 'masonry tiles' ){
$blog_layout = 'masonry';
}
// Class | Columns
if( $_GET && key_exists('mfn-bc', $_GET) ){
$blog_classes[] = 'col-'. $_GET['mfn-bc']; // demo
} else {
$blog_classes[] = 'col-'. mfn_opts_get( 'blog-columns', 3 );
}
if( $_GET && key_exists('mfn-bfw', $_GET) ) $section_class[] = 'full-width'; // demo
if( mfn_opts_get('blog-full-width') && ( $blog_layout == 'masonry' ) ) $section_class[] = 'full-width';
$section_class = implode( ' ', $section_class );
// Isotope
if( $blog_layout == 'masonry' ) $blog_classes[] = 'isotope';
// Ajax | load more
$load_more = mfn_opts_get('blog-load-more');
// Translate
$translate['filter'] = mfn_opts_get('translate') ? mfn_opts_get('translate-filter','Filter by') : __('Filter by','betheme');
$translate['tags'] = mfn_opts_get('translate') ? mfn_opts_get('translate-tags','Tags') : __('Tags','betheme');
$translate['authors'] = mfn_opts_get('translate') ? mfn_opts_get('translate-authors','Authors') : __('Authors','betheme');
$translate['all'] = mfn_opts_get('translate') ? mfn_opts_get('translate-all','Show all') : __('Show all','betheme');
$translate['categories'] = mfn_opts_get('translate') ? mfn_opts_get('translate-categories','Categories') : __('Categories','betheme');
$translate['item-all'] = mfn_opts_get('translate') ? mfn_opts_get('translate-item-all','All') : __('All','betheme');
?>
<!-- #Content INDEX -->
<div id="Content">
<div class="content_wrapper clearfix">
<!-- .sections_group -->
<div class="sections_group">
<div class="extra_content">
<?php
if( get_option( 'page_for_posts' ) || mfn_opts_get( 'blog-page' ) ){
if( category_description() ){
echo '<div class="section the_content category_description">';
echo '<div class="section_wrapper">';
echo '<div class="the_content_wrapper">';
echo category_description();
echo '</div>';
echo '</div>';
echo '</div>';
} else {
mfn_builder_print( mfn_ID(), true );
}
}
?>
</div>
<?php if( ( $filters = mfn_opts_get( 'blog-filters' ) ) && ! is_singular() && ( get_post_type() == 'post' ) && get_option( 'page_for_posts' ) ): ?>
<div class="section section-filters">
<div class="section_wrapper clearfix">
<?php
$filters_class = '';
if( $blog_layout == 'masonry' ) $filters_class .= ' isotope-filters';
if( $filters != 1 ){
$filters_class .= ' only '. $filters;
}
?>
<!-- #Filters -->
<div id="Filters" class="column one <?php echo $filters_class; ?>">
<ul class="filters_buttons">
<li class="label"><?php echo $translate['filter']; ?></li>
<li class="categories"><a class="open" href="#"><i class="icon-docs"></i><?php echo $translate['categories']; ?><i class="icon-down-dir"></i></a></li>
<li class="tags"><a class="open" href="#"><i class="icon-tag"></i><?php echo $translate['tags']; ?><i class="icon-down-dir"></i></a></li>
<li class="authors"><a class="open" href="#"><i class="icon-user"></i><?php echo $translate['authors']; ?><i class="icon-down-dir"></i></a></li>
<li class="reset"><a class="close" data-rel="*" href="<?php echo get_permalink( mfn_ID() ); ?>"><i class="icon-cancel"></i><?php echo $translate['all']; ?></a></li>
</ul>
<div class="filters_wrapper">
<ul class="categories">
<?php
echo '<li class="reset-inner"><a data-rel="*" href="'. get_permalink( mfn_ID() ) .'">'. $translate['item-all'] .'</a></li>';
if( $categories = get_categories() ){
foreach( $categories as $category ){
echo '<li><a data-rel=".category-'. $category->slug .'" href="'. get_term_link($category) .'">'. $category->name .'</a></li>';
}
}
?>
<li class="close"><a href="#"><i class="icon-cancel"></i></a></li>
</ul>
<ul class="tags">
<?php
echo '<li class="reset-inner"><a data-rel="*" href="'. get_permalink( mfn_ID() ) .'">'. $translate['item-all'] .'</a></li>';
if( $tags = get_tags() ){
foreach( $tags as $tag ){
echo '<li><a data-rel=".tag-'. $tag->slug .'" href="'. get_tag_link($tag) .'">'. $tag->name .'</a></li>';
}
}
?>
<li class="close"><a href="#"><i class="icon-cancel"></i></a></li>
</ul>
<ul class="authors">
<?php
echo '<li class="reset-inner"><a data-rel="*" href="'. get_permalink( mfn_ID() ) .'">'. $translate['item-all'] .'</a></li>';
$authors = mfn_get_authors();
if( is_array( $authors ) ){
foreach( $authors as $auth ){
echo '<li><a data-rel=".author-'. mfn_slug( $auth->data->user_login ) .'" href="'. get_author_posts_url($auth->ID) .'">'. $auth->data->display_name .'</a></li>';
}
}
?>
<li class="close"><a href="#"><i class="icon-cancel"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
<?php endif; ?>
<div class="section <?php echo $section_class; ?>">
<div class="section_wrapper clearfix">
<div class="column one column_blog">
<div class="blog_wrapper isotope_wrapper">
<div class="posts_group lm_wrapper <?php echo implode(' ', $blog_classes); ?>">
<?php echo mfn_content_post( false, false, $load_more ); ?>
</div>
<?php
// pagination
if( function_exists( 'mfn_pagination' ) ):
echo mfn_pagination( false, $load_more );
else:
?>
<div class="nav-next"><?php next_posts_link(__('← Older Entries', 'betheme')) ?></div>
<div class="nav-previous"><?php previous_posts_link(__('Newer Entries →', 'betheme')) ?></div>
<?php
endif;
?>
</div>
</div>
</div>
</div>
</div>
<!-- .four-columns - sidebar -->
<?php get_sidebar( 'blog' ); ?>
</div>
</div>
<?php get_footer();
// Omit Closing PHP Tags
<?$APPLICATION->IncludeComponent(
"bitrix:news",
"smt_specialization",
Array(
"ADD_ELEMENT_CHAIN" => "N",
"ADD_SECTIONS_CHAIN" => "Y",
"AJAX_MODE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"BROWSER_TITLE" => "METATITLE",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "Y",
"COMPONENT_TEMPLATE" => "smt_specialization",
"DETAIL_ACTIVE_DATE_FORMAT" => "j M Y",
"DETAIL_DISPLAY_BOTTOM_PAGER" => "Y",
"DETAIL_DISPLAY_TOP_PAGER" => "N",
"DETAIL_FIELD_CODE" => array(0=>"",1=>"",),
"DETAIL_PAGER_SHOW_ALL" => "N",
"DETAIL_PAGER_TEMPLATE" => "",
"DETAIL_PAGER_TITLE" => "",
"DETAIL_PROPERTY_CODE" => array(0=>"",1=>"",),
"DETAIL_SET_CANONICAL_URL" => "N",
"DISPLAY_AS_RATING" => "rating",
"DISPLAY_BOTTOM_PAGER" => "Y",
"DISPLAY_DATE" => "Y",
"DISPLAY_NAME" => "N",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"IBLOCK_ID" => "3",
"IBLOCK_ID_DOCTOR" => "4",
"IBLOCK_ID_PRICE" => "12",
"IBLOCK_TYPE" => "smt_clinic",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"LIST_ACTIVE_DATE_FORMAT" => "j M Y",
"LIST_FIELD_CODE" => array(0=>"",1=>"",),
"LIST_PROPERTY_CODE" => array(0=>"",1=>"",),
"MAX_VOTE" => "5",
"MEDIA_PROPERTY" => "",
"MESSAGE_404" => "",
"META_DESCRIPTION" => "METADESCRIPTION",
"META_KEYWORDS" => "METAKEYWORDS",
"NEWS_COUNT" => "12",
"PAGER_BASE_LINK_ENABLE" => "N",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "N",
"PAGER_SHOW_ALWAYS" => "N",
"PAGER_TEMPLATE" => ".default",
"PAGER_TITLE" => "",
"PERIOD_NEW_TAGS" => "",
"PREVIEW_TRUNCATE_LEN" => "",
"SEF_FOLDER" => "/specialization/",
"SEF_MODE" => "Y",
"SEF_URL_TEMPLATES" => array("news"=>"","section"=>"#SECTION_CODE#/","detail"=>"#SECTION_CODE#/#ELEMENT_CODE#/",),
"SET_LAST_MODIFIED" => "N",
"SET_STATUS_404" => "N",
"SET_TITLE" => "Y",
"SHOW_404" => "N",
"SLIDER_PROPERTY" => "",
"SORT_BY1" => "NAME",
"SORT_BY2" => "SORT",
"SORT_ORDER1" => "DESC",
"SORT_ORDER2" => "ASC",
"STRICT_SECTION_CHECK" => "N",
"TAGS_CLOUD_ELEMENTS" => "150",
"TAGS_CLOUD_WIDTH" => "100%",
"TEMPLATE_THEME" => "blue",
"USE_CATEGORIES" => "N",
"USE_FILTER" => "N",
"USE_PERMISSIONS" => "N",
"USE_RATING" => "N",
"USE_RSS" => "N",
"USE_SEARCH" => "N",
"USE_SHARE" => "N",
"VOTE_NAMES" => array(0=>"1",1=>"2",2=>"3",3=>"4",4=>"5",5=>"",)
)
);?>
<?
CModule::IncludeModule("iblock");
$dbSection = CIBlockSection::GetList(
Array("SORT" => "ASC"),
Array(
"IBLOCK_ID" => $arItems["IBLOCK_ID"],
"ID" => $arItems["ID"]
),
false,
Array("ID", "IBLOCK_ID", "UF_IMG")
);
if ($arSection = $dbSection->Fetch()) {
if(intval($arSection["UF_IMG"]) > 0){
$arSection["UF_IMG_ARRAY"] = CFile::GetFileArray($arSection["UF_IMG"]);
print_r($arSection["UF_IMG_ARRAY"]);
}
}
?>
array("IBLOCK_ID" => $arItems["IBLOCK_ID"], "ID" => $arItems["ID"]),