allmarkedup/prontotype — pull request #9 by emilbjorklund (2012-09-25 11:15:32+00:00)
Title: Added options to navigation macro

I added a couple of options that I felt the need for when using the navigation macro in Prontotype:

1. I wanted to be able to ignore certain pages when generating the navigation. For example, when the prototype is to resemble a "real" site, pages like pattern collections etc are best left out, as to not confuse others looking at the prototype.

2. I wanted to be able to configure classnames on items, more specifically current item and items with submenus.

I added 3 options to the macro based on this.
The `ignore_pages` option checks a list of URLs to ignore when generating list-items, sans the "index.php/" (if present). This is rather naively done by using the `replace` filter in Twig, and in my rather limited testing it works both with and without mod_rewrite.

The `is_current_class` and `is_parent_class` option just uses the `default` filter to output the class name if not present.