-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Feature #298: Views Namespace #300
base: main
Are you sure you want to change the base?
Conversation
b7f7368
to
c3b9f83
Compare
Unfortunately As far as this change goes, I'm not completely closed to the idea but I'm not sure that it adds much advantage over just using local folders. I'd love to hear other users' thoughts or comments. |
Thanks for mentioning the documentation now I get why @ was being ignored in code. I am really looking forward for this update because i have a project which allows devs upload there own themes and with namespaces I can give them a fake server directory structure instead of giving them actual directory structure also it helps reorganizing files and folders easily without actually editing the templates and there include paths |
@vikaskandari ok, that makes sense! I think you might be able to do that using the method I linked above, actually -- maybe you could give that a try? |
partials and automatic template resolution is cool but it solves 50% of my problem, i acutally need paths that will resolve templates outside the root/main directory and i really don't want to give .../../ in templates and include paths thats why i was suggesting namespaces, i haven't seen this feature in any template engine as far as i know, i hope other devs can see the some more use cases in this. btw is there any option to provide custom path resolver ? like a interceptor / middleware for path so i can modify the path of each template with my own custom syntax of include for eaxmple if user sets @project/includes/component1 then i can intercept it and resolve the actual path ? this will eliminiate the need of namespaces we can impliment our own custom logic to resolve path. |
@vikaskandari hmm, that makes sense. I'll leave this issue open to gauge interest. As far as overriding, you should just be able to override |
Feature Request : #298
i am not sure if code qualiy meets the codebase standards however i did add some comments and try to keep code changes as minimal as possible , i have tested it with bun and seems to work fine , let me know if you got any changes in mind or any issues with code , i did removed the
!template.startsWith('@')
from code i was not sure what was the use of it although directories can be named with @ prefix so i haven't tested with it otherwise everything works fine.