4 Replies Latest reply: Mar 28, 2013 7:17 AM by Mahalwar RSS

    Unable to render CSS

    Mahalwar
      Hi,

      I tried going through First site II for CSS but I am unable to get the break through.

      1. I understand that FSIILayout is the main template
      2. On this they are making call to :

      <render:lookup varname="StyleSheetTemplate" key="StyleSheetResolver" />

      <render:lookup varname="RecoAssetId" key="StyleSheetReco" match=":x"/>

      <render:lookup varname="RecoAssetType" key="StyleSheetReco" match="x:"/>


      3. I got the the stylesheetResolver but unable to find StylesheetReco


      Problem: Unable to find template by the name 'StylesheetReco'


      Also, I tried putting CSS in the way of AviSports i.e puttin them in css folder like avisports:

      webapps/cs/avisports/css/lt7.css
      webapps/cs/avisports/css/form.css
      webapps/cs/avisports/css/all.css


      but it is not picking up from that css folder. Do we have to register them somewhere or something.
        • 1. Re: Unable to render CSS
          kpsangeeth
          I dont think you will find a template named 'StyleSheetReco' as it is the value of key attribute in the lookup map. Refer to the Map section of the template asset, you will find the value for the key attribute which could be a template name. Ideal way is to load your CSS files by creating them as assets and using fatwire tags to load it in your page.
          • 2. Re: Unable to render CSS
            Mahalwar
            Hi,

            Sorry for late update.. yeah.. last night after putting on this.. I happened to find that mapping that you are saying..

            thanks a lot for your reply..

            so what you saying is that we should make style sheet as our assest then use 'link' tag to call them ?? or any other tag you are talking about??
            • 3. Re: Unable to render CSS
              kpsangeeth
              Yes you can use link tag only. You can store the stylesheet file as a blob attribute of an asset type and render this attribute as href of the link tag. Another approach will be to store the stylesheet code as a cselement and then have a site entry to be able to render it through a url. The relative url can be given as href of the link tag. Hope it helps.
              • 4. Re: Unable to render CSS
                Mahalwar
                thanks