Most Commerce Reference Store pages include the <crs:pageContainer> tag. This tag includes the store.war/includes/pageStart.jsp file, which has code for determining which site-specific CSS files to use. This code retrieves the context path from the originating request and uses that, in conjunction with the base CSS filename from the site configuration’s cssFile property, to build the pathname to the base CSS file. It then determines, depending on the current language and browser, whether to also include links to any language-specific or Internet Explorer-specific CSS files:

<dsp:page>
  <dsp:importbean bean="/atg/multisite/Site" var="currentSite"/>
  <dsp:importbean bean="/atg/store/StoreConfiguration" var="storeConfiguration"/>

  <dsp:getvalueof var="contextPath" bean="/OriginatingRequest.contextPath"/>
  <dsp:getvalueof var="language"
                  bean="/OriginatingRequest.requestLocale.locale.language"/>

  <%-- Other page code exists here but has been removed for readability. --%>


      <%-- Load the site specific CSS --%>
      <dsp:getvalueof var="siteCssFile" value="${currentSite.cssFile}" />

      <c:choose>
        <c:when test="${empty siteCssFile}">
          <dsp:getvalueof var="siteCssFile"
                          value="${storeConfiguration.defaultCssFile}" />
        </c:when>
      </c:choose>

      <c:if test="${not empty siteCssFile}">
        <link rel="stylesheet" href="${contextPath}/${siteCssFile}.css"
              type="text/css" media="screen" charset="utf-8" />

        <%-- Load language specific CSS if this is a language which requires
             additional styling --%>
        <c:if test="${language eq 'de'}">
          <link rel="stylesheet" href="${contextPath}${siteCssFile}_de.css"
                type="text/css" media="screen" charset="utf-8" />
          <!--[if IE]>
            <link rel="stylesheet" href="${contextPath}${siteCssFile}_de_ie.css"
                  type="text/css" media="screen" title="no title"
                  charset="utf-8" />
          <![endif]-->
        </c:if>

        <c:if test="${language eq 'es'}">
          <link rel="stylesheet" href="${contextPath}${siteCssFile}_es.css"
                type="text/css" media="screen" charset="utf-8" />
          <!--[if IE]>
            <link rel="stylesheet" href="${contextPath}${siteCssFile}_es_ie.css"
                  type="text/css" media="screen" title="${siteCssFile}_es_ie.css"
                  charset="utf-8" />
          <![endif]-->
        </c:if>
      </c:if>

<%-- Other page code exists here but has been removed for readability. --%>

</dsp:page>

Similar logic is used to determine the CSS files for pop-up windows. Pop-up window JSPs include the <crs:popupPageContainer> tag, which includes the store.war/includes/popupStart.jsp file, which has code for determining which CSS files to use.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices