@pmall Because it's easier that way. Why would I want to add an database entry and a seperate file with view data? While I can have everything at one place, in the database.
Because now I have to create, edit and remove the file, while this could easily be done, if it stayed as a bundle in the database.
Well, it's not a problem, actually, but would have loved to keep it together.
Hm...I'm still not understanding the benefit to this.
Don't content management systems typically keep the files as views and render them? The DB would just decide which file/view to render. Creating your own theme meant creating a sub-directory with files that follow that specific CMS's standards.
Personally, I feel like it would be a hassle to keep the actual views in the DB because that would slow me down in terms of coding. For example, traditionally, if I'm creating a theme for a CMS, I can just open up my text editor and get started right away. Share my theme? Just zip it up and upload. Or put it on Github. Both are very fast solutions. If it's in the DB, how exactly would I change the view? Do I have to get authenticated and then use the browser to edit it? How would I share it?
@thomaskim Incidently pressed the awnsered my question button, but well, I guess it's the most interesting post, You also said something that made me change my mind so i will keep it that way ~
You are right, it's indeed a good choice to use normal files, did not see it that far yet.
The plan was to use a good textfield with markup's so that it's easily to manage within the control panel, it's not ment so that it will keep all views inside the database, but only those used with the pages.
It seems both have their own benefits, but indeed the theme idea, I did not really think about that one, you are absolutely right!
I will continue with views based, thank you :)
I know this is an old thread but most of the comments here are totally useless. You just keep saying there's no point doing this, yadda yadda. I hate it when people post comments like that when they don't have anything of actual value to say.
Now to provide some answer to the question, this package could be what you're looking for: https://packagist.org/packages/wpb/string-blade-compiler