Override template with a module

Hello i would like to override template with my module but can’t figure out, how to do that. the template, wich i need to override is ‘widget/locator/sort.tpl’. Any ideas?

Nobody knows how to do that?

I think it’s not possible, you can only use blocks in template, and there are no blocks in this template.

Hello Styopchik. I know nothing of modules and am not sure what you mean by, “override” but I have a thought. Could you not rename widget/locator/sort.tpl file to widget/locator/sortORIG.tpl? Then create file widget/locator/sort.tpl and add whatever template content might be in your module to the new file?

Also, with the concept of “blocks” could you add whatever block you need to the widget/locator/sort.tpl file?

Also found this which looked interesting: https://github.com/OXIDprojects/psBlocks

I really have no idea what I am talking about and probably should have not responded to your post. For whatever it it worth, perhaps it will stimulate some further thought.

Ray

Hi,

[QUOTE=leofonic;126652]and there are no blocks in this template.[/QUOTE]

It absolutely makes sense to use blocks in modules to be able to encapsulate them properly from the rest of the program. If blocks are missing, it is possible (and desired!) to contribute them on GitHub: https://github.com/OXID-eSales/oxideshop_ce

@RMIGHTY1: Maybe this is helpful for you:
http://www.marco-steinhaeuser.de/how-to-write-a-module-for-oxid-eshop-display-you-will-save-x-percent-on-the-product-details-page.html

Regards

@RMIGHTY1: Yes it’s possible to change sort.tpl in several ways, but all include manual intervention. With blocks you can change templates just by switching the module on. As there are no blocks here, i would change listlocator.tpl to include “mysort.tpl” and have this documented in installation instructions.

@Marco: i will do that when i’m more familiar with git.