Example - removing options

corey34

Active Member
I want to remove some of the options that MW has for customers. Is it possible to do this with themes, or would I have to edit core files?

For example, in customer > campaigns > setup, I want to remove the "from name", "from email", "reply to", and "to name" fields and just leave it as the default value that MW has.

Question 1: Is that something that is possible with themes (or maybe extensions)? If not, what is the best way to do something like this?

Question 2: Does anyone have an example of doing something like this?
 

twisted1919

Administrator
Staff member
@corey34 - You can do it from themes for sure. Keep in mind that this specific area is very complex and has complex logic, so you need to be extra careful so that removing some settings won't break the app in any way.
 

corey34

Active Member
@corey34 - You can do it from themes for sure.
Thanks.

So to modify a page in MW (in a theme), is it as simple as creating a modified version of the original file with the same file name and within the same folder structure? I guess I'm not 100% sure the process of creating a theme?

@corey34 - Keep in mind that this specific area is very complex and has complex logic, so you need to be extra careful so that removing some settings won't break the app in any way.
Would it be safe to assume that any input in these pages that has a default value can just be removed safely? For example, the from email address has a default value. Could I just remove that from the page and it would still work? Or would it be better to use CSS to not display it?
 

twisted1919

Administrator
Staff member
So to modify a page in MW (in a theme), is it as simple as creating a modified version of the original file with the same file name and within the same folder structure?
This is correct. See http://www.yiiframework.com/doc/guide/1.1/en/topics.theming for more info.

Would it be safe to assume that any input in these pages that has a default value can just be removed safely?
I think so, but for compatibility reasons, i would simply hide them via css.
 

twisted1919

Administrator
Staff member
Should I apply the CSS as a theme, or just add my own CSS by adding a file named style-custom.css inside backend|customer|frontend/assets/css
If you are using a theme already, then do it from the theme. If not, then there's no use, do it from style-custom.css (which btw, can be placed in /assets/css to load in all apps)
 
Top