Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
{artshow}{section name=i loop=$art_array}
{if $art_array[i].picture_exists}
	<img src="./products_pictures/{$art_array[i].picture}" hspace="10" align="left" />
{/if}
{/section}{if $news_posts[i].picture_exists}
	<img src="./products_pictures/{$news_posts[i].picture}" hspace="10" align="left" />
{/if}<a href="/index.php?art=yes&id={$art_array[i].NID}">{$art_array[i].title}<a href="/index.php?art_id={$art_array[i].NID}">{$art_array[i].title}if ( isset($_GET["art"]) || isset($_GET["art"]) )
		$art = 1;if ( isset($_GET["art_id"]) || isset($_GET["art_id"]) )
$art_id = 1;if ( isset($art) ){
		$ArtObj->generatePage('frontend art list');
	}if ( isset($art_id)) {
$ArtObj->generatePage('show particular art');
}case 'frontend art list':
				
				$xRequestURI = set_query('&msg=');
				$smarty->assign('xRequestURI', $xRequestURI);
				
				$lister = getListerRange($this->CurrentPage, $this->TotalPages);
				$smarty->assign('ListerRange', range($lister['start'], $lister['end']));
				$smarty->assign('CurrentPage', $this->CurrentPage);
				$smarty->assign('TotalPages', $this->TotalPages);
				$smarty->assign('LastPage', $this->TotalPages);
				$smarty->assign('art_posts', xHtmlSpecialChars($this->getArt(), array(), 'title') );
				
				$smarty->assign( 'main_content_template', 'art.frontend.list.tpl.html' );
				break;case 'show particular art':
				$art_id = $_GET['art_id'];
				$art_arr = xHtmlSpecialChars($this->getArt($art_id, 1, 1), array(), 'title');
				$smarty->assign('current_art_id', $art_arr );
				$smarty->assign( 'main_content_template', 'art.frontend.current.id.tpl.html' );
				break;{literal}
<style type="text/css">
.artdiv{
	border:0 dashed black;
	border-width: 1 0 0 0;
	margin:3px;
}
.artblock{
	float:left;
	width:100%;
}
</style>
{/literal}
<h1><u>{$smarty.const.ADMIN_ART}</u></h1>
<table cellpadding="4"><tr><td>
{if $current_art_id}
<div class="newsblock">
<h3>{$current_art_id.2}</h3>
<strong>{$current_art_id.1}</strong>
<p>
{if $current_art_id.3}
	<img src="./products_pictures/{$current_art_id.3}" hspace="10" align="left" />
{/if}
{$current_art_id.4}</p>
</div>
</div>
{else}
{$smarty.const.STRING_EMPTY_LIST}
{/if}
</td></tr></table>//novinki
if (!isset($_GET["novinki"])) // 
$smarty->assign("main_content_template", "home.tpl.html");
else
$smarty->assign("main_content_template", "novinki.tpl.html");
    //article
	if (!isset($_GET["article"]))
	$smarty->assign("main_content_template", "home.tpl.html");
	else
$smarty->assign("main_content_template", "article.tpl.html");//novinki
if (!isset($_GET["novinki"])) // это проверка на то, установленна переменная или нет
$smarty->assign("main_content_template", "home.tpl.html");
else
$smarty->assign("main_content_template", "novinki.tpl.html");
//top sales
if (!isset($_GET["best_books"])) // это проверка на то, установленна переменная или нет
$smarty->assign("main_content_template", "novinki.tpl.html");
else
$smarty->assign("main_content_template", "название_темплейта_с_топом_продаж.tpl.html");{* art *}
<table width="160" border="0" align="center" class="voting">
<form action="index.php" name="subscription_form" method=post>
<h1>{$smarty.const.ADMIN_ART}</h1>
	{section name=i loop=$art_array}
	<tr>
		<td>
			<a href="/index.php?art_id={$art_array[i].NID}">{$art_array[i].title}</a> 
			<br><br>
		</td>
	</tr>
	{/section}
</form>
</table><?php
if (isset($_GET["article"])){
$smarty->assign("main_content_template", "article.tpl.html");
}
?><a href="index.php?article">Статьи</a>//article
	if (!isset($_GET["article"]))
	$smarty->assign("main_content_template", "home.tpl.html");
	else
$smarty->assign("main_content_template", "article.tpl.html");	//novinki
if (!isset($_GET["novinki"]))
$smarty->assign("main_content_template", "home.tpl.html");
else
$smarty->assign("main_content_template", "novinki.tpl.html");//article
	if (!isset($_GET["article"]))
	$smarty->assign("main_content_template", "novinki.tpl.html");
	else
$smarty->assign("main_content_template", "article.tpl.html");Если просто добавить и то и другое, вместо главной - сразу грузятся новинки.
Если сделать, как писал Флинт
... при заходе на новинки, грузит первую (home) страницу.PHP://article if (!isset($_GET["article"])) $smarty->assign("main_content_template", "novinki.tpl.html"); else $smarty->assign("main_content_template", "article.tpl.html");
if (!isset($_GET["article"]))  
    $smarty->assign("main_content_template", "home.tpl.html");   
        else   
          $smarty->assign("main_content_template", "article.html");  
 
if (!isset($_GET["novinki"]))  
    $smarty->assign("main_content_template", "home.tpl.html");   
        else   
          $smarty->assign("main_content_template", "novinki.tpl.html");