문제

I want to do a tweak on the Search module, but I obviously don't want to mess with the original source, so is there a way to 'extend' an existing module? If so how? Or must I create a new module, copy the code from the Search module, and tweak that?

도움이 되었습니까?

해결책

In any case you need to create your own module. Whether to copy the code and tweak it or create your own implementation of some existing interface from scratch is up to you - this relies on your specific scenario and the extent of the tweaking needed.

There are a few ways to extend existing things in Orchard:

  • Any service interface that implements IDependency can be overridden by simply putting your own implementation in your module
  • OrchardSuppressDependency attribute can be used on your class to explicitly disable certain existing implementations
  • Shape templates and normal views can be overridden in the theme as descibed in docs
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top