chciałem oddzielić część templatek od innych ze względów tematycznych. Działają tylko dwie a z resztą mam problem bo wyskakuje że nie istnieje choć w folderze jest zadeklarowana i ma swoje "ciało"...
przedstawiam kod
admin.php
<?php include("engine/database.class.php"); databaseConnection(); require("libs/Smarty.class.php"); $smarty = new Smarty; //$smarty->force_compile = true; $smarty->debugging = false; $smarty->caching = false; $smarty->cache_lifetime = 120; $smarty->addTemplateDir("templates/admin"); $smarty->template_dir = "templates/admin"; $smarty->compile_dir = "templates/admin/admin_c"; include("pages/admin.php"); if($where == "" ) { $where = "start"; } $default = $pages_admin["default"]; $page = $pages_admin[$where]; { $smarty->assign("content", $page); $smarty->display("admin.tpl"); } else { //header("HTTP/1.1 404 Not Found"); } ?>
pages/admin.php
<?php 'link' => FALSE, 'template' => FALSE, 'title' => '', 'seo_title' => '', 'seo_description' => 'default description', 'seo_keywords' => 'default keywords', 'lang' => 'pl', 'redirect' => FALSE, 'response' => FALSE, 'article' => FALSE ), //admin pages 'link' => 'start', 'template' => 'start.tpl', 'title' => 'Mini CMS - Panel administracyjny', 'seo_title' => 'Mini CMS - Panel administracyjny', 'seo_description' => '', 'seo_keywords' => '', 'lang' => 'pl', ), 'link' => 'pages', 'template' => 'pages.tpl', 'title' => 'pages', 'seo_title' => 'Mini CMS - zarządzanie stronami', 'seo_description' => '', 'seo_keywords' => '', 'lang' => 'pl', ), 'link' => 'works', 'template' => 'works.tpl', 'title' => 'works', 'seo_title' => 'Mini CMS - zarządzanie pracami', 'seo_description' => '', 'seo_keywords' => '', 'lang' => 'pl', ), 'link' => 'news', 'template' => 'news.tpl', 'title' => 'news', 'seo_title' => 'Mini CMS - zarządzanie newsami', 'seo_description' => '', 'seo_keywords' => '', 'lang' => 'pl', ), 'link' => 'test', 'template' => 'test.tpl', 'title' => 'test', 'seo_title' => 'strona testowa', 'seo_description' => '', 'seo_keywords' => 'praktyki', 'lang' => 'pl', ) ); return false; ?>
admin.tpl
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="pl" /> <meta name="author" content="" /> <meta name="reply-to" content="" /> <meta name="date" content="2014/01/10" /> <meta name="robots" content="index,follow" /> <meta name="distribution" content="global" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link href="templates/admin/images/flavicon.png" rel="shortcut icon" /> <link rel="stylesheet" href="templates/style/admin.css" type="text/css" /> <!--<script type="text/javascript" src="jq/admin.js"></script>--> <title>{$content.seo_title}</title> <meta name="keywords" content="{$content.seo_keywords}" /> <meta name="description" content="{$content.seo_description}" /> </head> <body> <div id="wrapper"> <div id="container"> <ul> <li><a href="pages.html">strony</a></li> <li><a href="works.html">prace</a></li> <li><a href="news.html">news</a></li> </ul> <br /> </div><!-- #container# --> </div><!-- #wrapper# --> </body> </html>
Jest ktoś kto widzi błąd?