peerkar/liferay-gsearch

Possible to add extension points for overriding soy-templates?

Closed this issue ยท 6 comments

I don't have very much experience with soy-portlets (yet), but would it be possible for you to add osgi extension points for overriding soy-templates in the web-module to allow full customization of the rendering? If so that would be highly useful and make this project super useful. (It already is a great project, but having to clone it to customize rendering makes it a bit more high maintenance to use).

Hi,
Thanks for your feedback! I agree and that feature is actually close to the top on my task list. I'll let you know here when it's available.

Awesome ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

Thi @deadcyclo , I did some research on this and I'm sorry to say but I didn't find a clean way to accomplish this - at least for now. OSGi fragments won't do here and Liferay SOY compiler doesn't understand SOY delegate package directives which could have been a possible approach (https://developers.google.com/closure/templates/docs/commands). I'm not too happy about this so I might take another look at the issue at later time but for now creating a fork and modifying the web-module is the way to go.

Thank you for your encouraging feedback! SOY compiling is done same way in both versions and the issue with OSGi fragment bundles is that you cannot override existing files with OSGi fragment bundles (JSP override fragment bundles are a Liferay specific exception). When it comes to fragments, however, if SOY delegate templates and packages were fully supported by Liferay compiler, you might want to try that approach because that's a SOY specific override mechanism.

I wish you best of luck with this experiment and and if you can find a way, I'd really appreciate if you can share the solution! If I find a way at a later time, I'll share it here on the project pages.

Thanks for your effort @peerkar I'll try to hint to Ray next time I talk to him about something that this is something we really need. Specially since it seems that LR is moving towards using Metal+soy internally (from my observation of recent changes in the source) this is going to be needed at some point. I'll keep you updated on any findings I do.