Replies: 2 comments 1 reply
-
Hey @guyinpv - I am sorry the late reply here. For now, let me reply (too late) to your comment.
Those files are intended to be "mostly html" views (if we speak in MVP terms) That is what those files are for Or, another example is https://github.com/TukuToi/tukutoi-template-builder/tree/main/admin/partials The core idea of this is to allow you to separate concerns (display, logic) The name The cannot be "used" by the boilerplate because the boilerplate does not know what you want to do with it. Hope it makes sense |
Beta Was this translation helpful? Give feedback.
-
Thanks again, it makes sense how you use them. In one of my small plugins, for things like shortcodes or email body content, it's so short that I just inlined the HTML strings rather than include separate template files. I wonder if a small templating engine wouldn't be a bad thing for the boilerplate? Maybe not Twig if that's too heafty, but some simple means to call upon templates with inheritance ability, and pass data to them. Just a thought! |
Beta Was this translation helpful? Give feedback.
-
I've been studying the plugin and the only two things that seem to have no connected use, are the "partials" folders. There is one in the admin folder and one in the public folder. There are two php files
....admin-display.php
and...public-display.php
. These aren't referenced anywhere in the plugin so it's not really clear how to make use of the "partials" folders in the first place.It's obvious these are used for some kind of templating, but since they are named "partials", I have to assume there should be some other templates that aren't partials? Should there be a
/templates
folder along with partials?I think either remove partials altogether, or make the templating abilities a little more useful out of the box so that we can do something with them right away.
I think having these two partial templates sitting there with no connection to anything, isn't that helpful. Either build them out so that they are used even in a basic way (templating front and back), or just remove them entirely. Otherwise as it is, it's just kind of confusing since there is no boilerplate for how to load them or anything.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions