I m getting the hang of mustache for a project I ve started during the weekend.
I m using the PHP implementation. I have, however a couple of inquiries as I m not used to the system.
How do you handle template inheritance, or reuse? I know of partials, but how should I use them? I m doing something like this, ala include:
top.mustache:
<!DOCTYPE html>
<html lang= es >
<head>
<meta charset=utf-8" />
<link rel="stylesheet" href="/media/style.css" type="text/css" media="screen" />
</head>
<body>
<header><h1><a href="/">Top</a></h1>
</header>
<section>
bottom.mustache:
</section>
<footer><a href="http://potajecreativo.com/">potaje</a></footer>
</body>
</html>
And a view to render this template:
{{>top}}
<form action="/album/" method="post">
<p><label for="name">Name</label> <input type="text" name="name" value=""/></p>
<p><label for="description">Description</label> <textarea name="description" rows="8" cols="40"></textarea></p>
<p><input type="submit" value="Save" /></p>
</form>
{{>bottom }}
Is this the right approach?