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

Can we introduce something similar to view partials in rails (for duplicated parts of views) #62

Closed
appleios opened this issue Dec 28, 2015 · 4 comments
Assignees

Comments

@appleios
Copy link

Im templates there are a lot of duplicated code, for example:

//
//  {{ module_info.name }}{{ module_info.file_name }}
//  {{ module_info.project_name }}
//
//  Created by {{ developer.name }} on {{ date }}.
//  Copyright {{ year }} {{ developer.company }}. All rights reserved.
//

Some tests files also need the same imports:

import Quick  // https://github.com/Quick/Quick/blob/master/Documentation/QuickExamplesAndGroups.md
import Nimble // https://github.com/Quick/Nimble

It would be great, if we could use some partials to generate duplicated parts of templates.

@etolstoy
Copy link
Member

@appleios thanks for a very nice idea, we'll definitely implement it in one of the upcoming versions!

@mogol
Copy link
Contributor

mogol commented Jan 8, 2016

Really cool idea.

@etolstoy
Copy link
Member

Looks like Liquid has this ability by design, should be really easy to implement. I'll investigate it closely and update one of our templates with partials.

@etolstoy etolstoy self-assigned this Feb 7, 2016
etolstoy added a commit that referenced this issue Feb 18, 2016
Replace Tilt on the Liquid and implemented nested template #62
@etolstoy
Copy link
Member

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

3 participants