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

Why no template engine for controller views? #263

Closed
that0n3guy opened this issue Jun 6, 2014 · 4 comments
Closed

Why no template engine for controller views? #263

that0n3guy opened this issue Jun 6, 2014 · 4 comments

Comments

@that0n3guy
Copy link
Contributor

Why isn't a template engine used for controller views? I was expecting to use twig.... but thats only used for components it seems.

@that0n3guy
Copy link
Contributor Author

Thinking about this more, I have more questions.

controller views don't use twig, but use the extention htm...
components do use twig, but have the extention htm...

  1. Doesn't that seem confusing and inconsistant?
  2. Why not use the standard .twig extension for twig templates?
  3. Why not use (or allow) blade to be used for controller views. Its sooo much cleaner than puting php right in your html, its in Laravel core, and it allows for full php (unlike twig)

I can understand why you don't use twig for controller views (since only the developer has access to these files, full php access is OK and good. I can also understand why you use twig for rendering stuff the CMS might be putting out (since you may not trust the backend admins w/ full php).

But I don't understand the .htm thing.

Thoughts?

@that0n3guy
Copy link
Contributor Author

Almost a month and no answer... any updates?

@daftspunk
Copy link
Member

In October, view files use the .htm extension.

CMS view files are rendered with Twig.
Back-end view files are rendered with PHP.

Traditional view files (/views directory) are supported and are rendered with Blade if the extension is .blade, PHP if the extension is .php, and Twig if the extension is .htm. This is practically uncommon but is supported to be inline with Laravel.

@pymarco
Copy link

pymarco commented Jul 16, 2014

It is disappointing to not have twig available in the backend.

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

No branches or pull requests

3 participants