Issues with Theme Development Documentation in Bagisto v2.x
-
Hello Bagisto Community,
I hope everyone is doing well. I've been grappling with some uncertainties while working on theme development in Bagisto v2.x, and I could use your expertise to clear things up.
The official documentation at https://devdocs.bagisto.com/2.x/themes/create-theme.html has left me with questions, particularly about the directory structure for custom theme development. Should I use the
resources/themes/custom_theme/
location, or would it be more suitable to develop a theme withinpackages/CustomPackage/
orpackages/Webkul/CustomPackage/
?Additionally, I've noticed that the
.gitignore
file excludes the entire folder related to my theme. This has thrown me off a bit. Should I consider removing this entry to proceed with my development, or are there alternative approaches that the community recommends?My goal is to ensure that my custom theme remains intact during future Bagisto updates, without accidentally modifying core Bagisto files that could be reset during updates.
I appreciate any straightforward advice or insights you can offer on these matters. Let's get down to the specifics of theme development in Bagisto v2.x.
Thank you for your help.
-
@A_ColtZz we appreciate your engagement in theme development for Bagisto v2.x. Let's delve into your query.
The recommended approach for theme development in Bagisto is to create a new package.
This is to ensure that your custom theme remains intact during future Bagisto updates.You can find more info on the following pages
https://devdocs.bagisto.com/2.x/themes/
https://devdocs.bagisto.com/2.x/packages/create-package.htmlI hope this advice helps you move forward with your theme development.
If you have any further questions or need additional assistance, feel free to ask. -
@ghermans I appreciate the support!
Looking into the provided link(s):
https://devdocs.bagisto.com/2.x/themes/
The first link indeed clarified my questions regarding theme development and that it should be done through package development.https://devdocs.bagisto.com/2.x/packages/create-package.html
The second link regarding create package documentation does not provide a clear example for modifying the already existing theme by for example copying over the views/assets. What it does provide is a overview of how to create an additional extension to the Bagisto environment using 'Blog' as an example. I did manage to setup the bagisto-package-generator.Is there by any chance an open source GitHub project or example available? and if so, could you link that!
I have pretty much read through the same documentation multiple times but not really found the clarification on modifying the existing module(s)/package(s) from Bagisto. Nevertheless I will continue to try things out and follow some more of the examples.
Kind Regards,
A_ColtZz -
Hey @A_ColtZz
Hope you are doing well.
We've recently published a new blog post on custom theme development for both versions. Feel free to check out the link below for a step-by-step tutorial on creating a custom theme from scratch.
This should help address any issues you may have, and we're also in the process of working on the Devdoc documentation.
Link - https://bagisto.com/en/create-custom-theme-in-bagisto/
Thanks & Regards!