Add view classes for articles, banners, languages, menu, newsletter, containers, shop categories, clients, payment methods, products, and search
- 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.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?
|
||||
if ( is_array( $this -> pages ) ) {
|
||||
$settings = \front\factory\Settings::settings_details();
|
||||
$settings = (new \Domain\Settings\SettingsRepository( $GLOBALS['mdb'] ))->allSettings();
|
||||
|
||||
echo '<ul class="level-' . $this -> level . ' clear" level="' . $this -> level . '">';
|
||||
|
||||
@@ -10,9 +10,9 @@ if ( is_array( $this -> pages ) ) {
|
||||
if ( $page['page_type'] == 3 ) {
|
||||
$page['language']['link'] ? $url = $page['language']['link'] : $url = '#';
|
||||
} else if ( $page['page_type'] == 5 ) {
|
||||
$page['category_id'] ? $url = \front\factory\ShopCategory::category_url( $page['category_id'] ) : $url = '#';
|
||||
$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'] . '-' . \S::seo( $page['language']['title'] );
|
||||
$page['language']['seo_link'] ? $url = '/' . $page['language']['seo_link'] : $url = '/s-' . $page['id'] . '-' . \Shared\Helpers\Helpers::seo( $page['language']['title'] );
|
||||
}
|
||||
unset( $children );
|
||||
|
||||
@@ -26,7 +26,7 @@ if ( is_array( $this -> pages ) ) {
|
||||
if ( $page['id'] == $this -> current_page )
|
||||
echo ' active';
|
||||
|
||||
if ( is_array( $page['pages'] ) and in_array( $this -> current_page, $children ) )
|
||||
if ( is_array( $page['pages'] ) and is_array( $children ) and in_array( $this -> current_page, $children ) )
|
||||
echo ' open';
|
||||
|
||||
if ( is_array( $page['pages'] ) )
|
||||
@@ -34,8 +34,8 @@ if ( is_array( $this -> pages ) ) {
|
||||
|
||||
echo '">';
|
||||
echo '<a href="';
|
||||
if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language() and $url != '#' and $page['page_type'] != 3 and $page['page_type'] != 5 )
|
||||
echo '/' . \S::get_session( 'current-lang' );
|
||||
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"';
|
||||
@@ -47,7 +47,7 @@ if ( is_array( $this -> pages ) ) {
|
||||
if ( is_array( $page['pages'] ) )
|
||||
echo '<i class="fa fa-chevron-down menu-toggle" menu-id="link-' . $page['id'] . '"></i>';
|
||||
echo '</a>';
|
||||
echo \front\view\Menu::pages( $page['pages'], $this -> level + 1, $this -> current_page );
|
||||
echo \front\Views\Menu::pages( $page['pages'], $this -> level + 1, $this -> current_page );
|
||||
echo '</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
|
||||
Reference in New Issue
Block a user