我很抱歉這個愚蠢的問題,但我不明白!小鬍子 - 如何建立一個導航/鏈接
我想建立一個簡單的網站前端像這樣的例子有鬍子: http://detector.dmolsen.com/demo/mustache/
如果我只有一個頁面一個網站 - 一切都很好: 創建我的鬍子對象...和等
// use .html instead of .mustache for default template extension
$options = array('extension' => '.html');
// Template and Partial - Filesystem Loader
$mustache = new Mustache_Engine(array(
'loader' => new Mustache_Loader_FilesystemLoader(__DIR__.'/views', $options),
'partials_loader' => new Mustache_Loader_FilesystemLoader(__DIR__.'/views/partials/'.$GLOBALS['comparedDeviceInformation']['Device Class'], $options),
));
在這之後我使我的索引模板:
// render index.html template
echo $mustache->render('index', $data);
這工作完全正常! 現在在這個'index.html'模板文件中,我不想鏈接到另一個模板,例如home.html的
<a href="?????">home</a>
我該如何處理網址?我不能使用模板的名稱?所以我如何得到一個一致的網址結構爲我的網站
非常感謝!
非常感謝你:) – Christoph
不是問題:) – bobthecow