forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyriaque Dupoirieux <Cyriaque.Dupoiri...@pcotech.fr>
Subject Re: [Views] use twice a contract drive two include twice the header...
Date Thu, 28 Jul 2005 08:28:50 GMT
Thorsten Scherler a écrit :

>On Thu, 2005-07-28 at 09:40 +0200, Cyriaque Dupoirieux wrote:
>  
>
>>Thorsten Scherler a écrit :
>>    
>>
>>>...
>>>      
>>>
>>I was not talking about <forrest:css url="anyfile.css"/> included 
>>several times in an *.fv - IMO this is the writer responsibility to be 
>>carreful of what he includes in his view.
>>(We cannot control that the included css is necessary...)
>>
>>    
>>
>
>I added a key which will include only 
>
>  
>
Good,

>>I was talking about the myContract-head content.
>>
>>In fact, I was trying to dispatch the content of a whole css used with pelt skin -
screen.css - into several specific css included by the different contracts.
>>Benefits of this is that css :
>>
>>    * are smaller and easy to understand
>>    * contains only what the contract needs
>>    * are only included if necessary, that is if you use the contract in
>>      your view.
>>
>>Disadvantages are :
>>
>>    * the number of included files in the HTML page increase. (but I
>>      don't know if it can have an impact on performance.)
>>
>>Thank you for your correction, I will try this today.
>>
>>    
>>
>
>Actually we started like this. Each contract could provide css-templates
>as well but we decided that we should rather not do it like this.
>
>The problem is the reusabilty of the contract in different skins. A
>contract should be as skin independent as possible. The performance
>should not be a problem.
>
>salu2
>
>  
>
Well, quilckly, here is what I have done :
I have created :

    * a *pelt *subfolder in resources/skin/css
    * a *pelt *subfolder in resources/templates

I have modified the output.xmap to select the template called in your 
view by searching in :

    * first in your project,
    * second, in resources/templates/{forrest:skin}
    * third, in resources/templates
    * finally, noFt.ft...

Then I have modified the resources.xmap to select the css a template 
wants to include by searching in :

    * first in your project resources,
    * second, in resources/skin/css/{forrest:skin}
    * third, in resources/skin/css
    * finally, in the {forrest:context}/skins/common/css... (I don't
      know if we should keep this option ?)

So, I don't think there is a problem with skin dependancy :

    * If you use a standard template (I used several with pelt skin) you
      can overide the standard css by putting a specific one in
      resources/skin/css/{forrest:skin} - and even for customers, by
      putting a super specific in project resources/css which will be
      used in priority ... -
    * If you use a specific template, you keep the standard css unless
      you create a specific one in resources/skin/css/{forrest:skin} or
      in project resources/css

In conclusion, it works well with me and I have several different 
configuration depending on the need of the template I use...

Salutations,
Cyriaque,


Mime
View raw message