[ DurbanPoison® @ 12.05.2005. 14:08 ] @
Pozdrav svima na forumu Ja sam pocetnik i vec imam problem. Pokusavam popuniti pageContentsCell na mom sajtu, ali ne ide. Da li mi mozete pomoci? moj kod za index.php: Code: <?php require_once 'include/app_top.php'; $page = new Page(); $pageContentsCell = "first_page_contents.tpl"; $page->assign('Links', array('about' => 'templates/about_us.tpl', 'info' => 'templates/info.tpl')); if (isset($Links['about'])) { $pageContentsCell = "templates/about_us.tpl"; } $page->assign("pageContentsCell", $pageContentsCell); $page->display('index.tpl'); ?> index.tpl: Code: {* smarty *} {config_load file="site.conf"} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link href="style.css" rel="stylesheet" type="text/css" /> <title>{#sitetitle#}</title> </head> <body bgcolor="#FFFFCC"> {include file="header.tpl"} <table cellspacing="0" cellpadding="0" width="760" height="100%" border="0" align="center"> <tr> <td valign="top" > {include file="navigation.tpl"} </td> <td> {include file="$pageContentsCell"} </td> </tr> </table> </body> </html> i navigation.tpl: Code: {* navigation.tpl *} <link href="style.css" rel="stylesheet" type="text/css" /> <script src="listmenu.js" type="text/javascript"></script> <ul class="treemenu"> </br> <li><a href="">Home</a></li> <li class="treenode"> <a href="">info</a> <ul> <li><a href="{$Links.about}">about</a></li> <li><a href="">List Item</a></li> <li><a href="">List Item</a></li> <li><a href="">List Item</a></li> </ul> Kad pozovem "about" dobijem samo kod. Kako resiti ovaj problem, gde gresim? Molim vas pomozite |