This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div tal:repeat="res results"> | |
| <span tal:content="res/id"/> | |
| <span tal:content="uri res --edit"/> | |
| </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| method index($c) is Path is Args(0) { | |
| my @results = Foo.new(id => 1), Foo.new(id => 2), Bar.new(id => 3); | |
| my proto sub uri(|) { * } | |
| my multi sub uri(Foo $f, $action) { $c.uri_for('/foo', $f.id, $action) } | |
| my multi sub uri(Bar $b, $action) { $c.uri_for('/bar', $b.id, $action) } | |
| $c.stash({ | |
| template => 'index.zpt', | |
| uri => &uri, | |
| results => @results, | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment