Witam,
chcę wdrożyć nowy szablon do serwisu z aktualnościami lokalnej społeczności. Składa się on z 5. różnych podstron widocznych dla użytkowników.
Aktualnie znaleźć go można pod adresem
http://stalowka.mobi/To co aktualnie udało mi się stworzyć można zobaczyć klikając w poniższe linki
http://lukaszbaranowski.twrpowersystem.com...lowka/index.phphttp://lukaszbaranowski.twrpowersystem.com...hod=aktualnoscihttp://lukaszbaranowski.twrpowersystem.com...method=archiwumMój problem polega na tym, że nie potrafię wnieść nic nowego co będzie działać i zgodnego z szablonem Smarty.
Myślę, że momentem przełomowym dla mnie będzie skonstruowanie podstrony, która wyświetli jednocześnie menu boczne i odpowiednio listę newsów, galerii, skróconych aktualności.
Strona główna
<?php if(!defined('SMARTY_DIR')) exit('no direct access allowed'); ?> <?php $_smarty_tpl->decodeProperties('a:1:{s:15:"file_dependency";a:1:{s:10:"F666081590";a:2:{i:0;s:29:"lib/smarty/templates/menu.tpl";i:1;i:1285914873;}}}'); ?>
<?php /* Smarty version Smarty3-b5, created on 2010-10-01 08:34:36
compiled from "lib/smarty/templates/menu.tpl" */ ?>
<?php $_template = new Smarty_Template
("meta.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id);$_template->caching = 0; echo $_template->getRenderedTemplate(); unset($_template); ?><?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']); $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['name'] = 'glowna';
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('tablica_wynik_podstrony')->value) ?
count($_loop) : max(0
, (int
)$_loop); unset($_loop); $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['show']) {
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['loop'];
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['total'] == 0)
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['show'] = false;
} else
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['show']):
for ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['iteration'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['total'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['first'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['last'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['total']);
if ($_smarty_tpl->getVariable('smarty')->value['section']['glowna']['first']){?>
<div id="strona">
<div id="top">
<!-- Logo strony -->
<a href="index.php" title="stalowka.mobi-mobilny informator"><img src="lib/smarty/templates_c/images/logo.png" alt="logo" id="logo" /></a>
<!-- /Logo strony -->
</div>
<div id="kolumny">
<!-- Kolumna lewa -->
<div id="_lewa">
<div id="_lewa_top">
</div>
<div id="_lewa_center">
<!-- Menu -->
<h2>Menu</h2>
<ul class="menu">
<?php }?>
<li><a href="
<?php echo $_smarty_tpl->getVariable('tablica_wynik_podstrony')->value[$_smarty_tpl->getVariable('smarty')->value['section']['glowna']['index']]['link'];?>">
<?php echo $_smarty_tpl->getVariable('tablica_wynik_podstrony')->value[$_smarty_tpl->getVariable('smarty')->value['section']['glowna']['index']]['tytul'];?></a></li>
<?php endfor; endif; ?>
</ul>
<h2 class="mb">Lokalne strony mobilne</h2>
<ul class="menu">
<li><a href="http://pracujesie.pl">Praca - Stalowa Wola</a></li>
<li><a href="http://mieszkasie.pl">Mieszkania - Stalowa Wola</a></li>
<li><a href="http://mobi.rozwadow.pl/">Rozwadów</a></li>
<li><a href="http://mobi.kinoballada.info/">Kino Ballada</a></li>
</ul>
<!-- /Menu -->
</div>
<div id="_lewa_bottom">
</div>
</div>
<!-- /Kolumna lewa -->
<!-- Kolumna prawa -->
<div id="_prawa">
<div id="_prawa_top">
<h2 class="gr">Aktualności</h2>
</div>
<div id="_prawa_center">
<div id="aktualnosci">
<div id="tresc">
<div id="tresc_lewa">
<?php $_smarty_tpl->getVariable('tablica_wynik_podstrona')->value[0]['tytul']; ?>
</div>
<div id="tresc_prawa">
<h1><a href="strona-
<?php echo $tresc['id_podstrona']; ?>.html" title="
<?php echo $tresc['tytul'];?>">
<?php echo $tresc['tytul'];?></a></h1>
tresc
<a href="strona-
<?php echo $tresc['id_podstrona']; ?>.html" title="Czytaj dalej">Czytaj dalej »</a>
</div>
<div class="clear_both">
</div>
<?php } ?>
</div>
</div>
<div id="_prawa_bottom">
</div>
</div>
<!-- /Kolumna prawa -->
</div>
</div>
<?php $_template = new Smarty_Template
("dol.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id);$_template->caching = 0; echo $_template->getRenderedTemplate(); unset($_template); ?>
{include file="meta.tpl"}
<!-- Logo strony -->
<a href="index.html" title="stalowka.mobi-mobilny informator"><img src="lib/smarty/templates_c/images/logo.png" alt="logo" id="logo" /></a> <!-- /Logo strony -->
<!-- Kolumna lewa -->
<!-- Menu -->
{section name=glowna loop=$tablica_wynik_podstrony}
<li><a href="{$tablica_wynik_podstrony[glowna].link}" class="link">{$tablica_wynik_podstrony[glowna].tytul}
</a></li> {/section}
<h2 class="mb">Lokalne strony mobilne
</h2> <li><a href="http://pracujesie.pl">Praca - Stalowa Wola
</a></li> <li><a href="http://mieszkasie.pl">Mieszkania - Stalowa Wola
</a></li> <li><a href="http://mobi.rozwadow.pl/">Rozwadów
</a></li> <li><a href="http://mobi.kinoballada.info/">Kino Ballada
</a></li> <!-- /Menu -->
<!-- /Kolumna lewa -->
<!-- Kolumna prawa -->
<h2 class="gr">Aktualności
</h2> <a href="java script:history.back()" title="Powrót">Powrót
</a><br /> <a href="index.html" title="Wróc na stronę główną">Strona główna
</a>
{section name=glowna loop=$tablica_wynik_podstrony}
{$tablica_wynik_podstrona[0].tytul}
<h1>{$tablica_wynik_podstrony[glowna].link}
</a></h1> {$tablica_wynik_podstrony[glowna].pozycja}
<a href="strona-{$tablica_wynik_podstrona[glowna].id_podstrona}-{$tablica_wynik_podstrona[glowna].tytul|urlok|truncate:40:""}.html" class="link">Czytaj dalej
»</a> {/section}
<!-- /Kolumna prawa -->
{include file="dol.tpl"}
Proszę o pomoc i pozdrawiam serdecznie