Recent Topics

Custom Theme in Separate Package

  • Hi there
    I am trying to determine if Bagisto suits my needs for an urgent project.
    So far things are looking okay, however I am struggling to work out how to create a custom theme that is able to be kept within its own package (I do not want to be editing files in too many places outside of this package for the theme as I want to be able to easily reuse it in other projects).
    How do I go about setting up the views_path etc. in themes.php to point to views within a specific package (e.g. ACME/CustomTheme)?
    Secondly, is there any "minimalist" theme out there I can look at? Even the default theme has a lot of extra stuff in it I don't need and whilst I can of course start with that and remove what I don't want it would be nice to have something that is the absolute minimum for a working "shop".

  • Hi @porl,

    There is no minimalist theme right now. For theme creation, you need to take the exact file structure of the shop package.

    Just start with the views directory of the shop package.

  • Hi @devansh-webkul
    Thanks for that. I have a package with a mirrored views directory from the shop package, but how to I reference it from the themes.php file?

  • Hi again
    Never mind, I found the solution.
    For anyone else with the same issue I needed the full path (relative to the root Bagisto directory).


    'views_path' => 'packages/ACME/CustomTheme/src/Resources/views/shop',
    'assets_path' => 'packages/ACME/CustomTheme/src/Resources/assets',

    Not sure if there is a cleaner way to do this but it works at least.

  • Hi @porl,

    Exactly, you need to give the path in the themes.php file and change the default view.

Log in to reply