peerkar / liferay-gsearch

Google like search for Liferay 7 CE and DXP
Other
56 stars 36 forks source link

Possible to add extension points for overriding soy-templates? #14

Closed deadcyclo closed 5 years ago

deadcyclo commented 5 years ago

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).

peerkar commented 5 years ago

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.

deadcyclo commented 5 years ago

Awesome :+1: :+1: :+1:

peerkar commented 5 years ago

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.

FriesBureau commented 5 years ago

I assumed that you wouldn't accomplish the task, because I understood the lack of comparatibilty between DXP and CE editions. Therefore I hired some expertise from Freelancer.com. Maybe the freelancer will create a fix for CE. Maybe not.

If I have a ready CE edition, I surely will send it to you. I love your work by the way, and would happily contribute. But I am not an expert in plugins.

Best regards

Carsten

Den 28. jan. 2019 kl. 12.58 skrev Petteri Karttunen notifications@github.com:

Thi @deadcyclo https://github.com/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 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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/peerkar/liferay-gsearch/issues/14#issuecomment-458064643, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3aP0dm_7tIH123JFynlMoZuRevP-Suks5vHsmxgaJpZM4aFF_1.

peerkar commented 5 years ago

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.

deadcyclo commented 5 years ago

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.