I am trying to use a bootstrap navbar as my main template, the main index.volt as a parent view, and a child, such as app/views/index/index.volt. So here is my parent view, layouts/main.volt, with twitter bootstrap navbar:
# layouts/main.volt (with bootstrap navbar)
<div class="navbar navbar-inverse" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">SeanWentz.TK</a>
</div>
{{ navi.getMenu() }} //a function to spawn menu items
</div>
</div>
</html>
my app/views/index.volt:
# app/views/index.volt with volt parent blocks
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
{{ stylesheet_link('css/lavish-bootstrap.css')}}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" contet="Sean Wentz">
<title>{% block title %}{% endblock %} | SeanWentz.TK</title>
</head>
<body>
{{ content() }}
{{ javascript_include('js/jquery-2.1.1.min.js') }}
{{ javascript_include('js/bootstrap.min.js') }}</body>
</html>
and finally, a child view, app/views/index/index.volt:
# app/views/index/index.volt with child blocks
{% extends "index.volt%}
{% include "layouts/main.volt"%}
{% block title %}
Home
{% endblock %}
{% block content %}
<h1>Congratulations!</h1>
<p>You're now flying with Phalcon. Great things are about to happen!</p>
{% endblock %}
What exactly am I doing wrong? If I remove the extends line from the last file, the page loads, but I need it in order to set the title prefix according to the page. I know I must have my code wrong somehow.
I am new to this framework, and fairly new to php as a whole. Please forgive my newbishness! All help greatly appreciated. I want to learn all I can about this framework... its great. Seriously great.
Thanks again!