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

Suggestion for executing templates with location/path as a variable #2

Open
stevielj opened this issue Mar 24, 2016 · 2 comments
Open

Comments

@stevielj
Copy link

I'm trying to think of a way to execute templates based on router parameters. If I have a large collection of templates arranged in a folder structure, I'd like to be able execute one via the path without explicitly wiring everything up before hand. I'd love to see an option on qtc to generate a map of function pointers where I could look for a template at a particular path, execute it if it exists, or choose a template in a parent location if it doesn't. (hope that makes sense, and I'm assuming that the template all need to take the same args) Eventually, I may actually store the templates in a database and write them out to the file system as part of the build process before invoking qtc. This would give me back some of the advantages of dynamic templates while enjoying the speed and efficiency of quicktemplates.

@frederikhors
Copy link

@stevielj did you fixed this?

I think I need something similar here: #58, right @valyala?

@valyala
Copy link
Owner

valyala commented Jul 29, 2019

Yes, it is quite similar to the issue described in #58 .
Unfortunately the solution proposed by @stevielj looks quite complicated from user PoV. That's why it isn't implemented yet :(

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