Book Image

Learning Phalcon PHP

Book Image

Learning Phalcon PHP

Overview of this book

Table of Contents (17 chapters)
Learning Phalcon PHP
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The Frontend layout and basic functionality


We are going to use a simple layout for our frontend module. Switch to the modules/Frontend/Views/Default/common folder and create the footer.volt, paginator.volt, and navbar.volt files with the following content.

footer.volt

The footer.volt file does not contain too much information, but in future, you will want to add more information for sure, such as links, partners, analytics scripts, and so on:

<footer class="lp-footer">
    <p>Learning Phalcon</p>
    <p>
        <a href="#">Back to top</a>
    </p>
</footer>

paginator.volt

The paginator.volt file contains two simple links: Previous and Next. You can modify these and create a more complex paginator if you wish:

<nav>
  <ul class="pager">
    <li><a href="?p={{ records['before'] }}">Previous</a></li>
    <li><a href="?p={{ records['next'] }}">Next</a></li>
  </ul>
</nav>

navbar...