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,11 +1,11 @@
|
||||
<? global $lang;?>
|
||||
<?
|
||||
$text = $this -> article['language']['text'];
|
||||
$text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
$text = \front\Views\Articles::generateHeadersIds( $text );
|
||||
?>
|
||||
<div class="article">
|
||||
<?
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \Shared\Helpers\Helpers::seo( $this -> article['language']['title'] );
|
||||
|
||||
if ( $this -> article['show_title'] )
|
||||
echo '<h3 class="article-title">' . $this -> article['language']['title'] . '</h3>';
|
||||
@@ -46,16 +46,16 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
<? if ( $this -> article['language']['table_of_contents'] ):?>
|
||||
<div class="table-of-contents">
|
||||
<div class="title">
|
||||
<?= \S::lang( 'spis-tresci' );?>
|
||||
<?= \Shared\Helpers\Helpers::lang( 'spis-tresci' );?>
|
||||
</div>
|
||||
<?= $this -> article['language']['table_of_contents'];?>
|
||||
</div>
|
||||
<? else:?>
|
||||
<div class="table-of-contents">
|
||||
<div class="title">
|
||||
<?= \S::lang( 'spis-tresci' );?>
|
||||
<?= \Shared\Helpers\Helpers::lang( 'spis-tresci' );?>
|
||||
</div>
|
||||
<?= \front\factory\Articles::generateTableOfContents( $text );?>
|
||||
<?= \front\Views\Articles::generateTableOfContents( $text );?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endif;?>
|
||||
@@ -67,7 +67,11 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
{
|
||||
$article_tmp = explode( ':', $article_tmp );
|
||||
if ( $article_tmp[1] != $this -> article['id'] )
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', \front\view\Articles::article_full( $article_tmp[1], $lang_id ), $text );
|
||||
{
|
||||
$nestedArticleRepo = new \Domain\Article\ArticleRepository( $GLOBALS['mdb'] );
|
||||
$nestedArticle = $nestedArticleRepo->articleDetailsFrontend( (int)$article_tmp[1], $lang_id );
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', $nestedArticle ? \front\Views\Articles::fullArticle( $nestedArticle ) : '', $text );
|
||||
}
|
||||
else
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', '', $text );
|
||||
}
|
||||
@@ -76,7 +80,7 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
if ( strpos( $this -> article['language']['text'], '[GALERIA]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['images'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
$gallery = $tpl -> render( 'articles/article-gallery' );
|
||||
@@ -88,7 +92,7 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
if ( strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['files'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> files = $this -> article['files'];
|
||||
$files = $tpl -> render( 'articles/article-files' );
|
||||
@@ -117,7 +121,7 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
$images[] = $image;
|
||||
}
|
||||
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> images = $images;
|
||||
$tpl -> article_id = $this -> article['id'];
|
||||
$tpl -> i = $i;
|
||||
@@ -157,14 +161,14 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
</div>
|
||||
<?
|
||||
if ( is_array( $this -> article['images'] ) and strpos( $this -> article['language']['text'], '[GALERIA]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
echo $tpl -> render( 'articles/article-gallery' );
|
||||
endif;
|
||||
|
||||
if ( is_array( $this -> article['files'] ) and strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> files = $this -> article['files'];
|
||||
echo $tpl -> render( 'articles/article-files' );
|
||||
|
||||
Reference in New Issue
Block a user