Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add include paths #6

Open
samdeane opened this issue Jun 19, 2013 · 1 comment
Open

Add include paths #6

samdeane opened this issue Jun 19, 2013 · 1 comment
Assignees

Comments

@samdeane
Copy link
Contributor

Add a way to specify other folder locations to use when looking for templates.

Currently included sub-templates are having to use relative paths, which is fine but gets a bit messy. It would be much better if we could specify one or more search paths to use.

Need to check how easy it is to support this in GRMustache, since it is currently doing the finding of the included files for us.

@ghost ghost assigned samdeane Jun 19, 2013
@groue
Copy link

groue commented Apr 25, 2014

The GRMustacheTemplateRepositoryDataSource protocol is your friend here: you can implement your custom template loading strategy.

// Configure template repository
GRMustacheTemplateRepository *repo = [[GRMustacheTemplateRepository alloc] init];
MyTemplateDataSource *dataSource = [[MyTemplateDataSource alloc] initWith...];
repo.dataSource = dataSource;

// Extract templates
GRMustacheTemplate *template = [repo templateNamed:... error:...];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants