Drukowana wersja tematu

Kliknij tu, aby zobaczyć temat w orginalnym formacie

Forum PHP.pl _ Systemy szablonów _ [Smarty] Zmienny content

Napisany przez: jadzia999222 1.10.2013, 11:02:37

Cześć mam pewien problem. W swoim pliku index.smarty mam taki oto kod:

[SMARTY] pobierz, plaintext
  1. {http://smarty.php.net/include file="`$smarty.const.APP_PATH`templates/`$smarty.const.APP_THEME`/modules/template-parts/header.smarty"}
  2. <div id="main-container">
  3. {http://smarty.php.net/if
  4.  
  5. http://smarty.php.net/%24smarty.get.startpage=="initialize"}
  6. {http://smarty.php.net/include
  7.  
  8. file="`$smarty.const.APP_PATH`templates/`$smarty.const.APP_THEME`/modules/template-parts/main-content.smarty"}
  9. {http://smarty.php.net/elseif
  10.  
  11. http://smarty.php.net/%24smarty.get.adminpage=="initialize" OR (strpos(http://smarty.php.net/%24smarty.server.REQUEST_URI, "admin")) }
  12. {http://smarty.php.net/include
  13.  
  14. file="`$smarty.const.APP_PATH`templates/`$smarty.const.APP_THEME`/modules/template-parts/admin-panel.smarty"}
  15. {http://smarty.php.net/else}
  16. {http://smarty.php.net/include
  17.  
  18. file="`$smarty.const.APP_PATH`templates/`$smarty.const.APP_THEME`/modules/`$smarty.session.tpl.file`"}
  19. {/http://smarty.php.net/if}
  20. </div>
  21. {http://smarty.php.net/include
  22.  
  23. file="`$smarty.const.APP_PATH`templates/`$smarty.const.APP_THEME`/modules/template-parts/footer.smarty"}
  24.  
[SMARTY] pobierz, plaintext

I tu jest content przypisany jeden do wszystkich podstron. Dopiero zaczynam swoją naukę dlatego proszę o pomoc. Chciałabym, żeby poza plikiem main-content.smarty lub panelu logowania czy admina była możliwość także dodania np abroad-content.smarty, ticket-content.smarty, hotels-content.smarty oraz polish-content.smarty. Czy ktoś mógłby mi pomóc?

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)