title: Mustache - How to build a Navigation/Link
body: <p>I'm sorry for this stupid question but i don't get it!</p>
  
  <p>I want to build a simple Website front-end like this Example with Mustache:
  <a href="http://detector.dmolsen.com/demo/mustache/" rel="nofollow">http://detector.dmolsen.com/demo/mustache/</a></p>
  
  <p>If I have a Website with just one Page - everything is fine:
  I create my Mustache Object ... and so on</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>// use .html instead of .mustache for default template extension
  $options =  array('extension' =&gt; '.html');
  
  // Template and Partial - Filesystem Loader
  $mustache = new Mustache_Engine(array(
      'loader' =&gt; new Mustache_Loader_FilesystemLoader(__DIR__.'/views', $options),
      'partials_loader' =&gt; new Mustache_Loader_FilesystemLoader(__DIR__.'/views/partials/'.$GLOBALS['comparedDeviceInformation']['Device Class'], $options),
  ));</code></pre>
  </div>
  </div>
  </p>
  
  <p>after this i render my index template:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>// render index.html template
  echo $mustache-&gt;render('index', $data);</code></pre>
  </div>
  </div>
  </p>
  
  <p>This works perfectly fine!
  And now in this 'index.html' template file I wan't to link to another template e.g. home.html</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;a href="?????"&gt;home&lt;/a&gt;</code></pre>
  </div>
  </div>
  
  how do i make such a dynamic rendering? It can't be the solution to have a php file for each page template? </p>
  
  <p>And how do i handle URLs? i can't use the name of the templates? so how do i get a consistent URL sturcture for my Website</p>
  
  <p>Thank you very much!</p>