84 lines
3.4 KiB
PHP
84 lines
3.4 KiB
PHP
<?
|
|
if ( is_array( $this -> pages ) )
|
|
{
|
|
$settings = \front\factory\Settings::settings_details();
|
|
|
|
echo '<ul class="level-' . $this -> level . ' clear">';
|
|
|
|
foreach ( $this -> pages as $page )
|
|
{
|
|
$url = "";
|
|
if ($settings['links_structure'])
|
|
{
|
|
if ($page['language']['seo_link'])
|
|
{
|
|
$url = '/'.\admin\factory\Pages::google_url_preview($page['id'], $page['language']['title'], $page['language']['lang_id'], 0, 0, $page['language']['seo_link']);
|
|
}
|
|
else
|
|
{
|
|
$url = '/'. \admin\factory\Pages::google_url_preview($page['id'], $page['language']['title'], $page['language']['lang_id'], 0, 0, 0);
|
|
}
|
|
}
|
|
else
|
|
$page['language']['seo_link'] ? $url = '/' . $page['language']['seo_link'] : $url = '/s-' . $page['id'] . '-' . \S::seo( $page['language']['title'] );
|
|
|
|
if ( $page['page_type'] == 3 and $page['language']['link'] )
|
|
$url = $page['language']['link'];
|
|
|
|
unset( $children );
|
|
|
|
if ( is_array( $page['pages'] ) ): foreach ( $page['pages'] as $page_tmp ):
|
|
$children[] = $page_tmp['id'];
|
|
endforeach; endif;
|
|
|
|
if($page['id'] != 73){
|
|
echo '<li id="link-' . $page['id'] . '" class="';
|
|
|
|
if ($page['id'] == $this -> current_page )
|
|
echo ' active';
|
|
|
|
if( is_array( $page['pages'] ) and in_array( $this -> current_page, $children ) )
|
|
echo ' open';
|
|
|
|
if ( is_array( $page['pages'] ) )
|
|
echo ' parent';
|
|
|
|
echo ' li-level-' . $this -> level . '">';
|
|
echo '<a href="';
|
|
if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language() and $url != '#' and $page['page_type'] != 3 )
|
|
echo '/' . \S::get_session( 'current-lang' );
|
|
echo $url . '"'; if ( $page['language']['noindex'] ) echo 'rel="nofollow"'; echo ' title="' . $page['language']['title'] . '"'; if ( is_array( $page['pages'] ) ) echo "class='menu-trigger'"; echo '>';
|
|
echo $page['language']['title'];
|
|
echo '</a>';
|
|
if ( is_array( $page['pages'] ) )
|
|
echo '<i class="fa fa-chevron-down"></i>';
|
|
echo \front\view\Menu::pages( $page['pages'], $this -> level + 1, $this -> current_page );
|
|
echo '</li>';
|
|
} else {
|
|
echo '<li id="link-' . $page['id'] . '" class="';
|
|
|
|
if ($page['id'] == $this -> current_page )
|
|
echo ' active';
|
|
|
|
if( is_array( $page['pages'] ) and in_array( $this -> current_page, $children ) )
|
|
echo ' open';
|
|
|
|
if ( is_array( $page['pages'] ) )
|
|
echo ' parent';
|
|
|
|
echo ' li-level-' . $this -> level . '">';
|
|
echo '<a href="';
|
|
if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language() and $url != '#' and $page['page_type'] != 3 )
|
|
echo '/' . \S::get_session( 'current-lang' );
|
|
echo $url . '"'; if ( $page['language']['noindex'] ) echo 'rel="nofollow"'; echo ' title="' . $page['language']['title'] . '"'; if ( is_array( $page['pages'] ) ) echo "class='menu-trigger'"; echo '>';
|
|
echo '<img src="/upload/filemanager/icons/logo_UE.jpg" style="width: 100%;" alt="Unia Europejska"></a>';
|
|
if ( is_array( $page['pages'] ) )
|
|
echo '<i class="fa fa-chevron-down"></i>';
|
|
echo \front\view\Menu::pages( $page['pages'], $this -> level + 1, $this -> current_page );
|
|
echo '</li>';
|
|
|
|
}
|
|
}
|
|
echo '</ul>';
|
|
}
|
|
?>
|