|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ViruSkin Smarty n00b
Joined: 14 Aug 2012 Posts: 1
|
Posted: Tue Aug 14, 2012 5:49 am Post subject: Podklu4enie CSS |
|
|
Доброго времени суток!
Скачал смарти 3 версии, вот у него файловая структура такова:
Quote: | /web/www.example.com/
templates/
index.tpl
templates_c/
configs/
cache/
htdocs/
index.php |
Вот тут не пойму, где должны лежать CSS, JS и пикчеры, чтобы подключались к шаблону. Вроде бы корневая директория /web/www.example.com/htdocs/ , но папка для шаблонов совсем другая /templates/ , не совать же css, js и рисунки в /htdocs/ |
|
Back to top |
|
zoonman Smarty n00b
Joined: 06 Sep 2013 Posts: 2
|
Posted: Fri Sep 06, 2013 10:54 pm Post subject: |
|
|
Да это абсолютно не обязательно придерживаться этой структуры.
У меня например вот так сделано
Code: |
/smarty/...
/tpl/index.tpl
/tmp/tlpc/
/tmp/cache/
/files/images/
/files/css/
/files/js/
index.php
..
|
И есть код, который настраивает это все
Code: |
define("SMARTY_DIR",dirname(__FILE__)."/smarty/");
include_once(SMARTY_DIR.'Smarty.class.php');
$sm = new Smarty();
$sm->cache_dir='tmp/cache';
$sm->template_dir='tpl';
$sm->compile_dir='tmp/tplc';
|
И так еще со Smarty 2 работает. Никаких проблем никогда не имел. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|