To simplify a little, I have a basic layout with a titlebar and a footer defined as a navbar like this:
<section data-role="layout" data-id="default">
<header data-role="header" id="rounded">
<div data-role="navbar">
<span data-role="view-title">Chapter 2</span>
</div>
</header>
<!--View content will render here-->
<footer data-role="footer">
<div data-role="navbar">
<a data-align="right" data-role="button" class="nav-button" href="<previous>"><i class="icon-arrow-left icon-large"></i></a>
<a data-align="right" data-role="button" class="nav-button" href="<next>"><i class="icon-arrow-right icon-large"></i></a>
</div>
<footer>
</section>
The idea is that I have multiple view like pages in a book, and I want to have a Previous and Next buttons in the footer, different on each view. I need help on how to define these links in a view file programmatically, so I can keep the footer inside the layout. I understand I can put the footer on each view, but somehow I think it would be more elegant to just have one footer in layout and then just add the links with js from the view.
Any adivice will be appreciated, thanks!
<section data-role="layout" data-id="default">
<header data-role="header" id="rounded">
<div data-role="navbar">
<span data-role="view-title">Chapter 2</span>
</div>
</header>
<!--View content will render here-->
<footer data-role="footer">
<div data-role="navbar">
<a data-align="right" data-role="button" class="nav-button" href="<previous>"><i class="icon-arrow-left icon-large"></i></a>
<a data-align="right" data-role="button" class="nav-button" href="<next>"><i class="icon-arrow-right icon-large"></i></a>
</div>
<footer>
</section>
The idea is that I have multiple view like pages in a book, and I want to have a Previous and Next buttons in the footer, different on each view. I need help on how to define these links in a view file programmatically, so I can keep the footer inside the layout. I understand I can put the footer on each view, but somehow I think it would be more elegant to just have one footer in layout and then just add the links with js from the view.
Any adivice will be appreciated, thanks!