3 Replies Latest reply on Mar 7, 2014 7:57 AM by whoiskevin

    themePath not working in CSS SOY

    samarth.shekhar02

      Hi,

      We were using to refer ant image in theme in jive 5 like

      background: url('${themePath}/images/banner.jpg')

      But themePath is no more recognized in Jive 7. So i tried using

      background:  url({themeUrl('/images/banner.jpg')})

       

      But the theme is not picking up the image file.

      Any suggestion for the same?

       

      Thanks,

      Samarth Shekhar

        • Re: themePath not working in CSS SOY
          whoiskevin

          Probably need more specifics here but in the soy files the parameters passed in do include a theme path (depending on which function you are looking at in the code).  You can try that as

          {$themeView.themePath}

            • Re: themePath not working in CSS SOY
              samarth.shekhar02

              Hi Kevin,

              I am just trying to create new theme.

              In the theme i am trying to add my custom css to  /soy/template/css-custom.soy .

              where i am using this :

               

              #j-header {

                position: relative;

                background:  url(<instance url>/themes/testTheme/images/banner.jpg)  61px 41px no-repeat transparent;

                border: 0px;

                height: 134px;

                background-color: #FFFFFF;

              }

              but as this is making my css to be tightly coupled with the instance and theme name, i want to make it generic for which i tried using liek this:

              #j-header {

                position: relative;

                background: url({themeUrl('/images/banner.jpg')})  61px 41px no-repeat transparent;

                border: 0px;

                height: 134px;

                background-color: #FFFFFF;

              }

               

              - Samarth Shekhar