Hi there,

it's me again. I think I am slowly getting the hang out of this enormous
application. However, right now I am stuck applying a common stylesheet to
my new hot-deploy-application. I couldn't find an article describing the
correct way of applying one, so I figured I may as well ask:

If I am not mistaken, then it is a 2 step procedure

Step 1 
One has to set the new template path as a field variable in the appropriate
Screens.XML file, as such:
<set field="layoutSettings.styleSheets[+0]"
value="${productStore.styleSheet}" default-value="/styles/main.css"
global="true" />

that should first look in the Database for an already existing stylesheet
location and otherwise fall back to the default-value location, correct?



Step 2 
One has to add the corresponding stylesheet to the <head> of the document

    <#if layoutSettings.styleSheets?has_content>
        <#--layoutSettings.styleSheets is a list of style sheets. So, you
can have a user-specified "main" style sheet, AND a component style
sheet.-->
        <#list layoutSettings.styleSheets as styleSheet>
            <link rel="stylesheet"
href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
        </#list>
    </#if>


And then the stylesheet should be integrated into the document... 

now, the reason I am asking is because I think I am missing out on
something. Can I access the CSS stored in the Database somehow and is it
really necessary for me to apply a default-value? 
-- 
View this message in context: 
http://www.nabble.com/Appropriate-use-of-Stylesheets-tp19329647p19329647.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Reply via email to