Jump to content

themes and modules


bartman

Recommended Posts

Is it possible do move the modules into the themes directory

so that if during the year you want to use seasonal thems that you can have differnet module layouts per theme,

I know you can set the theme dir in config.inc.php, but not sure what the knock on effect will be

Link to comment
Share on other sites

Yes, you can override the TPL file of modules by mirroring the path in the theme. For example, you could create two themes with different blockuserinfo.tpls by creating the following files:

themes/shop/modules/blockuserinfo/blockuserinfo.tpl
themes/christmas/modules/blockuserinfo/blockuserinfo.tpl

By doing this, you can simply switch the theme in the Back Office to Christmas without having to worry about editing code every time the season changes.

Link to comment
Share on other sites

  • 1 month later...

You can't copy an entire module into your theme directory, only the TPL files from a module. You must copy the entire module into the modules directory, then copy the TPL files that you want to change into your theme directory.

Link to comment
Share on other sites

Hi,

I have 3 themes (or more) were only the color is different. I did change the modules CSS to adapt colors for each themes.
I did duplicate the modules to have them in the themes with the modified CSS and it is no showing the CSS modifications.

If I understand, it is unfortunately, not possible to change the color off a module???

Thanks.

Link to comment
Share on other sites

Sure, just change the colours of the modules in css/global.css in each theme. Each theme should have a different global.css with different colours. If all you are doing is changing module colours, there is no need to duplicate modules or override them.

Link to comment
Share on other sites

1- I created a directory "modules" under the new theme
2- under this "modules" directory, i can put blockuserinfo/blockuserinfo.tpl and make the modifications that will take efects.

It is not working is to do the same with a block_module/ css/file.css.

Link to comment
Share on other sites

So you want to have multiple themes with different versions of modules/blocktopmenu/css/superfish-modified.css? To do that, you'll need to copy modules/blocktopmenu/blocktopmenu.tpl to themes/netred/modules/blocktopmenu/blocktopmenu.tpl and then change the following on line 19 from:

<link rel="stylesheet" type="text/css" href="{$this_path}css/superfish-modified.css" media="screen">



to:

<link rel="stylesheet" type="text/css" href="{$css_dir}superfish-modified.css" media="screen">



This will make the code look for themes/netred/css/superfish-modified.css instead of modules/blocktopmenu/css/superfish-modified.css.

Link to comment
Share on other sites

Thanks Rocky,

I does not work yet:

The root with default template is www.netshopin/netred/
There you can choose to run another template from the top left or right column.

Please choose the netpink template and see what happens after I changed the code to <link rel="stylesheet" type="text/css" href="{$css_dir}superfish-modified.css" media="screen"> in: themes/netpink/modules/blocktopmenu/blocktopmenu.tpl

The text appears but not the layout.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...