Replies: 1 comment
-
@bahdcoder Yes, you can do it using the disks of Edge. Lets say you store the templates inside the The user of your package can register a named disk as import View from '@ioc:Adonis/Core/View'
View.disk('bootstrap', absolutePathToThePackageViewsDir) and then they can use it as @component('bootstrap::template-name') |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. Would love to find out if there's a possibility to register edge templates in a third-party package, that way if you install the package, you can use a whole bunch of pre-registered templates.
Let's say I created a package called
adonis-mailer-bootstrap-template
, and anyone using my template can create a simple button using@!component('button', title = "Reset your password")
. This would be awesome. They can also use layouts registered by my package.I tried using
registerTemplate
, but it has no support for slots (i think)Thanks !
Beta Was this translation helpful? Give feedback.
All reactions