- Created Articles.php for rendering article views including full articles, miniature lists, and news sections. - Added Banners.php for handling banner displays. - Introduced Languages.php for rendering language options. - Implemented Menu.php for dynamic menu rendering. - Developed Newsletter.php for newsletter view rendering. - Created Scontainers.php for rendering specific containers. - Added ShopCategory.php for category descriptions and product listings. - Introduced ShopClient.php for managing client-related views such as address editing and order history. - Implemented ShopPaymentMethod.php for displaying payment methods in the basket. - Created ShopProduct.php for generating product URLs. - Added ShopSearch.php for rendering a simple search form. - Added .htaccess file to enhance security by restricting access to sensitive files and directories.
55 lines
2.1 KiB
PHP
55 lines
2.1 KiB
PHP
<?
|
|
if ( is_array( $this -> pages ) ) {
|
|
$settings = (new \Domain\Settings\SettingsRepository( $GLOBALS['mdb'] ))->allSettings();
|
|
|
|
echo '<ul class="level-' . $this -> level . ' clear" level="' . $this -> level . '">';
|
|
|
|
foreach ( $this -> pages as $page ) {
|
|
$url = "";
|
|
|
|
if ( $page['page_type'] == 3 ) {
|
|
$page['language']['link'] ? $url = $page['language']['link'] : $url = '#';
|
|
} else if ( $page['page_type'] == 5 ) {
|
|
$page['category_id'] ? $url = (new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ))->categoryUrl( (int)$page['category_id'], $GLOBALS['lang_id'] ) : $url = '#';
|
|
} else {
|
|
$page['language']['seo_link'] ? $url = '/' . $page['language']['seo_link'] : $url = '/s-' . $page['id'] . '-' . \Shared\Helpers\Helpers::seo( $page['language']['title'] );
|
|
}
|
|
unset( $children );
|
|
|
|
if ( is_array( $page['pages'] ) ): foreach ( $page['pages'] as $page_tmp ):
|
|
$children[] = $page_tmp['id'];
|
|
endforeach;
|
|
endif;
|
|
|
|
echo '<li id="link-' . $page['id'] . '" class="';
|
|
|
|
if ( $page['id'] == $this -> current_page )
|
|
echo ' active';
|
|
|
|
if ( is_array( $page['pages'] ) and is_array( $children ) and in_array( $this -> current_page, $children ) )
|
|
echo ' open';
|
|
|
|
if ( is_array( $page['pages'] ) )
|
|
echo ' parent';
|
|
|
|
echo '">';
|
|
echo '<a href="';
|
|
if ( \Shared\Helpers\Helpers::get_session( 'current-lang' ) != (new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ))->defaultLanguage() and $url != '#' and $page['page_type'] != 3 and $page['page_type'] != 5 )
|
|
echo '/' . \Shared\Helpers\Helpers::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'];
|
|
if ( is_array( $page['pages'] ) )
|
|
echo '<i class="fa fa-chevron-down menu-toggle" menu-id="link-' . $page['id'] . '"></i>';
|
|
echo '</a>';
|
|
echo \front\Views\Menu::pages( $page['pages'], $this -> level + 1, $this -> current_page );
|
|
echo '</li>';
|
|
}
|
|
echo '</ul>';
|
|
}
|
|
?>
|