Closed besi closed 10 years ago
Hi @besi,
This is because the renderObject:fromResource:bundle:error: method expects a resource with .mustache extension (if not stated clearly enough in the documentation, I'll have to fix this).
So either rename your file to .mustache or .txt.mustache (some people do that), either use your first technique, and everything will be OK.
Should you eventually want to split your templates into sub-templates (called partials), while keeping the .txt extension, you may be interested in the GRMustacheTemplateRepository class. It can handle a set of partials with any custom file extension. Please refer to the Template Repository Guide, linked from the README file.
Happy Mustache!
Wow thanks for the clarification. I will mustachen up my template then!
Great! Thanks for the nice answer :-)
I have a text file which is my template for a message, that I want to compose.
Now I could get the template to work, but not with the builtin
renderObject: fromResource: bundle: error:
method.So, this works
but this doesn't work