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

Switch to twig or another templating engine? #175

Open
optmsp opened this issue Jan 2, 2022 · 1 comment
Open

Switch to twig or another templating engine? #175

optmsp opened this issue Jan 2, 2022 · 1 comment

Comments

@optmsp
Copy link

optmsp commented Jan 2, 2022

I have been using yii2-enhanced-gii extensively to build and rebuild both my base models, controllers, and views in a new project. I have also extensively updated yii2-enhanced-gii so that it provides a lot more features -- mostly around being able to constantly rebuild existing code instead of being used for initial generation of code.

That said, it's very difficult at times building it out because the use of php templates to build php files can be very tricky to walk through and debug.

Thoughts on shifting the templates to twig, smarty, or another templating engine to really help split out the business logic from the code generation templates?

If so, I'd be happy to put in some time myself on that if that would be folded into this branch. Optionally, I could fork yii2-enhanced-gii, but that may be counter-productive long-term. Let me know your thoughts, thanks!

@optmsp
Copy link
Author

optmsp commented Jan 2, 2022

Examples updates I've done:

image

  • Ability to include/exclude edit/delete at the index and view level for a given class.
  • Ability to create new action buttons on a view form.
  • Ability to specify fields to include/exclude in sub-views.
  • Hyperlinks to related data in DataView.
  • And a few more.

But, again, I've found that as I add features, it's getting more and more difficult to debug things because of the way that the code is blended in with the templates.

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

No branches or pull requests

1 participant