ember1205 Posted August 5, 2013 Share Posted August 5, 2013 I'm wondering if modifying the module positions for Theme A would have any impact on the appearance of Theme B. Specifically, I would like to upload a copy of a theme I will use for production and make module changes to it to see how I like it. If it does what I want, I'll make the corresponding changes to the actual theme. If these items are theme-dependent (which it would seem the should be), can I restore the default positions by uploading the theme over again and overwriting the files on the server (assuming I didn't make any other theme-related changes)? Link to comment Share on other sites More sharing options...
swsindonesia Posted August 5, 2013 Share Posted August 5, 2013 Hi, Position of a module depends on the available HOOKS that a particular theme provides. By common sense, each theme developer should us a meaning name such as HOOK_LEFT will always be placed in the left column, and HOOK_RIGHT will always be placed in the left column. Though the placement may sometimes be different, one template may support a three column page, while other don't. Link to comment Share on other sites More sharing options...
vekia Posted August 5, 2013 Share Posted August 5, 2013 if you change the position of one module in theme A then in theme B it will appear in new position also Link to comment Share on other sites More sharing options...
ember1205 Posted August 5, 2013 Author Share Posted August 5, 2013 if you change the position of one module in theme A then in theme B it will appear in new position also And what happens when I switch from a three column theme to a two column theme? I'm very concerned about making changes to a theme because it will impact other themes even though it makes no logical sense to me that changing one theme immediately impacts them all. Link to comment Share on other sites More sharing options...
vekia Posted August 5, 2013 Share Posted August 5, 2013 it mean that one of the column will disappear, one of the hook will not be executed, and the modules from that hook will not appear Link to comment Share on other sites More sharing options...
ember1205 Posted August 5, 2013 Author Share Posted August 5, 2013 (edited) So, hooks are maintained on a global level instead of per-theme? That makes no sense to me (although I'm sure someone thought / thinks of it as good to do it that way). That would seemingly make for a LOT of work if I wanted to switch back and forth between a two-column or three-column theme. What happens in the case of multi-store? Edited August 5, 2013 by ember1205 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 5, 2013 Share Posted August 5, 2013 if you will use, for example, template with left column only - the right column will not appear - right hook will still exists, but it will be not visible (because you removed the right column from the template) then, when you will use template with all columns available - all of them will appear (modules attached to them too) - all hooks will be visible again. This is how MVC model works (and it is in my opinion the best architecture pattern). It mean that templates are separated from the core. YOu can't manipulate the core from the templates. multi store means multiconfiguration. YOu can manage modules positions for each store separately. Link to comment Share on other sites More sharing options...
ember1205 Posted August 5, 2013 Author Share Posted August 5, 2013 (edited) if you will use, for example, template with left column only - the right column will not appear - right hook will still exists, but it will be not visible (because you removed the right column from the template) then, when you will use template with all columns available - all of them will appear (modules attached to them too) - all hooks will be visible again. This is how MVC model works (and it is in my opinion the best architecture pattern). It mean that templates are separated from the core. YOu can't manipulate the core from the templates. I guess I see it more in the realm of how you would change layouts with CSS. Each "module" gets a unique DIV name. In the CSS, you control where it appears. Switching from one layout to another (i.e. Changing Themes) would not require the modification of the "hooks" for the modules since the CSS would be handling it. That would allow one layout to have a Left Column populated with a module and then the rest of the page be content. An alternative theme would move the content from the Left Column to the Right Column and move the content to the left edge. No changing hooks, no reprogramming the core, just a modification of the CSS (which could absolutely be done via the Back Office components with programming). multi store means multiconfiguration. YOu can manage modules positions for each store separately. Clearly, this isn't something I want to delve into either. One of the things I was considering was coding in a "choose your theme" sort of option for users, but PrestaShop apparently does not lend itself to that unless I create all of the display themes completely from scratch relying entirely on CSS to do the work. Thanks for the info. Edited August 5, 2013 by ember1205 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts