Documentation of overridable partials: https://github.com/groue/GRMustache/blob/master/Guides/partials.md
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
{{movie}} |
Documentation of rendering objects: https://github.com/groue/GRMustache/blob/master/Guides/rendering_objects.md
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
{{#movie}} | |
{{link}} | |
{{#director}} | |
by {{link}} | |
{{/director}} | |
{{/movie}} |
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
super.mustache: | |
<html> | |
<head><title>{{{title}}}</title></head> | |
<body> | |
{{>navigation}} | |
<div class="content"> | |
{{{content}}} | |
</div> | |
{{>footer}} | |
</body> |
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
layout.mustache: | |
<html> | |
<head><title>{{{$yield title}}}</title></head> | |
<body> | |
{{>navigation}} | |
<div class="content"> | |
{{{$yield}}} | |
</div> | |
{{>footer}} | |
</body> |
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
// helper function for silentValueForKey | |
id silentValueForUndefinedKey(id self, SEL _cmd, NSString *key) { | |
return nil; | |
} | |
// The purpose of this function is to have the same result as | |
// [object valueForKey:key], but instead of letting [NSObject valueForUndefinedKey:] | |
// raise an NSUndefinedKeyException, it silently returns nil instead. | |
id silentValueForKey(id object, NSString *key) { | |
// Does object provide the same implementations of valueForKey: and valueForUndefinedKey: as NSObject? |
NewerOlder