1 Reply Latest reply on Oct 6, 2016 10:51 PM by lars.kreisz

    Unable to customize JS-version of SOY

    lars.kreisz

      Hi Jivers,

       

      i customized a soy-template in a theme. It is rendered server- and client-side. The server-side rendered version comes with the customization as expected but the generated Javascript-version corresponds to the original jive version of the templates without customization.

       

      The changes made to templates can be as simple as adding a CSS class name to an html-tag to reproduce this problem.

       

      The templates i've customized is: jive.shared.displayutil.avatarImage which is located (beside multiple others) inside:

      • /src/main/themes/datev-theme/soy/shared/display_utils.soy

       

      It seems in the SOY-to-JS-compilation-process a first step is converting the single multi-template SOY-file into multiple single-template SOY-files. I found the corresponding single template SOY-file in jiveHome besides a JS-version.

      • target/jiveHome/www/resources/scripts/gen/soy/jive/shared/displayutil/avatarImage.js
      • target/jiveHome/www/resources/scripts/gen/soy/jive/shared/displayutil/avatarImage.soy

      The avatarImage.soy contains the original version of the template, not my customized one. The JS-Version is original too. It seems it's cut out of display_utils.soy before the template is overwritten by the theme version.

       

      As overriding a template via theme is a common and supported practice and it works just fine on the server side, does anybody know what am i doing wrong or have some hints?

       

      Thanks, Lars.