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.php
http://lukaszbaranowski.twrpowersystem.com...hod=aktualnosci
http://lukaszbaranowski.twrpowersystem.com...method=archiwum

Mó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
  1. <?php if(!defined('SMARTY_DIR')) exit('no direct access allowed'); ?>
  2. <?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;}}}'); ?>
  3. <?php /* Smarty version Smarty3-b5, created on 2010-10-01 08:34:36
  4.   compiled from "lib/smarty/templates/menu.tpl" */ ?>
  5. <?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); ?>
  6. <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']);
  7. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['name'] = 'glowna';
  8. $_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);
  9. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['show'] = true;
  10. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['loop'];
  11. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['step'] = 1;
  12. $_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;
  13. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['show']) {
  14. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['loop'];
  15. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['total'] == 0)
  16. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['show'] = false;
  17. } else
  18. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['total'] = 0;
  19. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['show']):
  20.  
  21. 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;
  22. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['total'];
  23. $_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']++):
  24. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['iteration'];
  25. $_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'];
  26. $_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'];
  27. $_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['first'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']['glowna']['iteration'] == 1);
  28. $_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']);
  29. if ($_smarty_tpl->getVariable('smarty')->value['section']['glowna']['first']){?>
  30. <div id="strona">
  31. <div id="top">
  32. <!-- Logo strony -->
  33. <a href="index.php" title="stalowka.mobi-mobilny informator"><img src="lib/smarty/templates_c/images/logo.png" alt="logo" id="logo" /></a>
  34. <!-- /Logo strony -->
  35. </div>
  36. <div id="kolumny">
  37. <!-- Kolumna lewa -->
  38. <div id="_lewa">
  39. <div id="_lewa_top">
  40. </div>
  41. <div id="_lewa_center">
  42. <!-- Menu -->
  43. <h2>Menu</h2>
  44. <ul class="menu">
  45. <?php }?>
  46. <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>
  47. <?php endfor; endif; ?>
  48. </ul>
  49. <h2 class="mb">Lokalne strony mobilne</h2>
  50. <ul class="menu">
  51. <li><a href="http://pracujesie.pl">Praca - Stalowa Wola</a></li>
  52. <li><a href="http://mieszkasie.pl">Mieszkania - Stalowa Wola</a></li>
  53. <li><a href="http://mobi.rozwadow.pl/">Rozwadów</a></li>
  54. <li><a href="http://mobi.kinoballada.info/">Kino Ballada</a></li>
  55. </ul>
  56. <!-- /Menu -->
  57. </div>
  58. <div id="_lewa_bottom">
  59. </div>
  60. </div>
  61. <!-- /Kolumna lewa -->
  62. <!-- Kolumna prawa -->
  63. <div id="_prawa">
  64. <div id="_prawa_top">
  65. <h2 class="gr">Aktualności</h2>
  66. </div>
  67. <div id="_prawa_center">
  68. <div id="aktualnosci">
  69. <div id="tresc">
  70. <div id="tresc_lewa">
  71. <?php $_smarty_tpl->getVariable('tablica_wynik_podstrona')->value[0]['tytul']; ?>
  72. </div>
  73. <div id="tresc_prawa">
  74. <h1><a href="strona-<?php echo $tresc['id_podstrona']; ?>.html" title="<?php echo $tresc['tytul'];?>"><?php echo $tresc['tytul'];?></a></h1>
  75. tresc
  76. <a href="strona-<?php echo $tresc['id_podstrona']; ?>.html" title="Czytaj dalej">Czytaj dalej &raquo;</a>
  77. </div>
  78. <div class="clear_both">
  79. </div>
  80. <?php } ?>
  81. </div>
  82. </div>
  83. <div id="_prawa_bottom">
  84. </div>
  85. </div>
  86. <!-- /Kolumna prawa -->
  87. </div>
  88. </div>
  89. <?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); ?>


  1. {include file="meta.tpl"}
  2. <div id="strona">
  3. <div id="top">
  4. <!-- Logo strony -->
  5. <a href="index.html" title="stalowka.mobi-mobilny informator"><img src="lib/smarty/templates_c/images/logo.png" alt="logo" id="logo" /></a>
  6. <!-- /Logo strony -->
  7. </div>
  8. <div id="kolumny">
  9. <!-- Kolumna lewa -->
  10. <div id="_lewa">
  11. <div id="_lewa_top">
  12. </div>
  13. <div id="_lewa_center">
  14. <!-- Menu -->
  15. <h2>Menu</h2>
  16. <ul class="menu">
  17. {section name=glowna loop=$tablica_wynik_podstrony}
  18. <li><a href="{$tablica_wynik_podstrony[glowna].link}" class="link">{$tablica_wynik_podstrony[glowna].tytul}</a></li>
  19. {/section}
  20. </ul>
  21. <h2 class="mb">Lokalne strony mobilne</h2>
  22. <ul class="menu">
  23. <li><a href="http://pracujesie.pl">Praca - Stalowa Wola</a></li>
  24. <li><a href="http://mieszkasie.pl">Mieszkania - Stalowa Wola</a></li>
  25. <li><a href="http://mobi.rozwadow.pl/">Rozwadów</a></li>
  26. <li><a href="http://mobi.kinoballada.info/">Kino Ballada</a></li>
  27. </ul>
  28. <!-- /Menu -->
  29. </div>
  30. <div id="_lewa_bottom">
  31. </div>
  32. </div>
  33. <!-- /Kolumna lewa -->
  34. <!-- Kolumna prawa -->
  35. <div id="_prawa">
  36. <div id="_prawa_top">
  37. <h2 class="gr">Aktualności</h2>
  38. <a href="java script:history.back()" title="Powrót">Powrót</a><br />
  39. <a href="index.html" title="Wróc na stronę główną">Strona główna</a>
  40. </div>
  41. <div id="_prawa_center">
  42. <div id="aktualnosci">
  43. <div id="tresc">
  44.  
  45. {section name=glowna loop=$tablica_wynik_podstrony}
  46. <div id="tresc_lewa">
  47. {$tablica_wynik_podstrona[0].tytul}
  48. </div>
  49. <div id="tresc_prawa">
  50. <h1>{$tablica_wynik_podstrony[glowna].link}</a></h1>
  51. {$tablica_wynik_podstrony[glowna].pozycja}
  52. <a href="strona-{$tablica_wynik_podstrona[glowna].id_podstrona}-{$tablica_wynik_podstrona[glowna].tytul|urlok|truncate:40:""}.html" class="link">Czytaj dalej &raquo;</a>
  53. </div>
  54. <div class="clear_both">
  55. </div>
  56. {/section}
  57.  
  58. </div>
  59. </div>
  60. </div>
  61. <div id="_prawa_bottom">
  62. </div>
  63. </div>
  64. <!-- /Kolumna prawa -->
  65. </div>
  66. </div>
  67.  
  68. {include file="dol.tpl"}


Proszę o pomoc i pozdrawiam serdecznie