Jump to content

[SOLVED] Best directory to edit blockModules... Parent or Child?


Recommended Posts

Hello,

 

I am a bit confused as to what is the best directory to edit blockModules in?

 

I can see and understand that certain child blockModules will only affect certain themes when edited in the sub themes folder

 

i.e. C:\xampp\htdocs\ROOTFOLDER\themes\eggs\modules

 

heres the but

 

If you only have one website in the root folder is it not best to edit the blockModules at the parent folder?

 

i.e. C:\xampp\htdocs\ROOTFOLDER\modules

 

Im just trying to understand the logic behind this configuration as the themes\eggs\modules folder does not contain as many blockModules?

 

Thanks

 

Marty

Edited by MartyW (see edit history)
Link to comment
Share on other sites

WIth overrides (using the themes folder) you can only edit tpl, js and css files. So, if you only need that, it's recommended to use that folder. If you want to edit PHP, you MUST use the core files, as you can't override modules' php files at the time being :)

 

Of course, any modification to a core module's php file will be gone at the next update

  • Like 1
Link to comment
Share on other sites

Hi Nemo,

 

I was working on removing the "Free Shipping" statement within the cartBlock using your tutorial http://nemops.com/hide-shipping-cost/ (Worked a treat thank you for that). I noticed that you were editing theme folders whereas up until then I had been editing the core files I will now copy all my edited core files to my themes folder to ensure I don't loose them at the next update.

 

Thank you

 

Marty

Link to comment
Share on other sites

Hi Everyone,

 

When I create a new theme, within the modules folder there is no "blockTopMenu" folder within the directory

 

C:\xampp\htdocs\ROOTFOLDER\themes\eggs\modules

 

To ensure I dont loose the CSS file that I have modified at the next update I created the blockTopMenu folder within the above directory and copied the CSS file accross to it

 

Is this the done thing?

 

Any thoughts on this would be greatly appreciated

 

Marty

Link to comment
Share on other sites

css style files have got separate directory in the theme directory. In this case, path looks like:

 

C:\xampp\htdocs\ROOTFOLDER\themes\eggs\css\modules\

 

create there there /blocktopmenu/ subdirectory

then create /css/ subdirectory (exactly as you have in the module dir)

 

and paste there your superfish-modified.css file

 

so finally, whole path to the file should looks like:

 

C:\xampp\htdocs\ROOTFOLDER\themes\eggs\css\modules\blocktopmenu\css\superfish-modified.css
Link to comment
Share on other sites

Hello Vekia,

 

Thanks for the reply, I done that and deleted the core CSS file, it broke the top menu of the site, which led me to ask my last question.

 

So really any CSS, TPL or JS file that is modified for a theme, in interest of good practice should be copied to the theme folder under the same directory as the core file?

 

Thank you for your help, i will get there eventually :wacko:

 

Marty

Link to comment
Share on other sites

it broke the top menu of the site

is there any possibility to check your website with this issue? remember, that if you move the css files, you have to move also img directories, especially when module uses own image files etc.

 

So really any CSS, TPL or JS file that is modified for a theme, in interest of good practice should be copied to the theme folder under the same directory as the core file

that's right, it isn't necessary, but as you said - it is good practie :)

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...