Re: Appropriate use of Stylesheets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Appropriate use of Stylesheets

BJ Freeman
I suggest some reading
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
particularly
Practice Documents
most of your answers are there


madppiper sent the following on 9/5/2008 6:30 AM:

> Sure thing, will do (can we move this thread to the Userforum?)
>
> ... back to subject: So how do I define these things now? I created a new
> folder under webapps/myapp/ called styles and placed my main.css file there,
> but the above set-field tag doesn't seem to work.
>
>
>
>
>
> jacques.le.roux wrote:
>> Correct it's defined in the main Store screen, but *please* use rather
>> user ML for such questions :
>> http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists#MailingLists-DeveloperList:dev@...
>>
>> Thanks
>>
>> Jacques
>>
>> From: "madppiper" <[hidden email]>
>>> 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.
>>>
>>
>