Microsite theme issue in Hawthorn


I am using Open edx Hawthorn release and i created microsite LMS, and tried to duplicate the default theme of the main LMS with new theme name in the same themes folder with new styles and images, but the issue on the microsite still taking the default CSS and images paths,
the duplicated theme is added in Django admin and all configurations added, but the CSS styles and images still taking the default theme path,

i can access the microsite in the browser and the Html templates added and displayed but the here is the styles, javascript, and images still taking the default

Please, any advice on that issue and how can fix the styles and if i missing ant step in the configurations related to the theme,

Thanks in advance,

Hello @mufleh and welcome to the comminity!

I would suggest you to use sites instead of microsites (microsites is deprecated for the future release). You can achieve the same using sites and site configuration, alternative of the microsites.

For this:

  • create site in admin panel
  • add siteconfiguration for your site in admin panel
  • create your site theme in your directory
  • set theme for your site at sitetheme table in admin panel

And your microsite is ready!

Thanks @jramnai, i already did all the above steps, but my issue here the duplicated theme is loading the default styles path,
in the templates, in main.html I changed this tag variable but still load the default like example below:
the default is <link rel="stylesheet" type="text/css" href="/static/${settings.FEATURES.get('KASHIDA_SITE_THEME', settings.DEFAULT_SITE_THEME)}/css/custom.css"></link>

in the new theme became like this:
<link rel="stylesheet" type="text/css" href="/static/${settings.FEATURES.get('THEME2', settings.DEFAULT_SITE_THEME)}/css/custom.css"></link>

but still load the old path why!!

If you have set things in the admin panel then there is no need to add theme-wise path in the main.html file.

It will determine your theme from the sitetheme table and look for the assets in the same theme if exists else it will take default assets.

For 2 theme my theme directory will be like this:


Now, if you want to apply THEME2 to your microsite then just set Theme dir name to THEME2 in the sitetheme table.

Don’t forget to update assets!