Re: Override-layout for Silva 2.1

"Luthiger Stoll Benno" <[email protected]> Fri, 4 Dec 2009 09:57:56 +0100
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
Dear David

Your hint looks interesting, I'll give it a try.

Thanks,
Benno

-----Original Message-----
From: ccaadgi [mailto:d.gillies-hclig2XLE9Zaa/[email protected]] 
Sent: Freitag, 4. Dezember 2009 09:33
To: Luthiger Stoll Benno
Cc: silva-dev-IAPFreCvJWM6s/[email protected]
Subject: Re: [silva-dev] Override-layout for Silva 2.1

Benno,

I'm not sure if this is what you're after but we used override 
functionality with SilvaLayout until recently.  In our layout template 
we used the condition:
<html tal:define="getoverride python:view.overrider()" >
<tal:block tal:condition="getoverride" tal:content="structure 
here/override.html" />
<tal:block tal:condition="python: not getoverride"  >
other stuff
</tal:block>

where overrider calls a function in the class associated with the template:
def overrider(self):
  override='override.html'
  context=self.context.aq_inner
  if hasattr(context.aq_explicit, override):
    return True
  else:
    return False

Hope that's some use.

david






>> *From: *"Luthiger Stoll  Benno" <[email protected] 
>> <mailto:[email protected]>>
>> *Date: *4 December 2009 08:29:19 GMT
>> *To: *"Silva Developer" <silva-dev-IAPFreCvJWM6s/[email protected] 
>> <mailto:silva-dev-IAPFreCvJWM6s/[email protected]>>
>> *Subject: **Re: [silva-dev] Override-layout for Silva 2.1*
>>
>> Hello all
>>
>> Is there no more help available from the infrae pros concerning my 
>> question?
>> Just a little tip, maybe.
>>
>> Regards,
>> Benno
>>
>>
>> -----Original Message-----
>> From: silva-dev-bounces-IAPFreCvJWM6s/[email protected] 
>> <mailto:silva-dev-bounces-IAPFreCvJWM6s/[email protected]>
>> [mailto:silva-dev-bounces-IAPFreCvJWM6s/[email protected]] On Behalf Of Marc Petitmermet
>> Sent: Dienstag, 1. Dezember 2009 12:35
>> To: Silva Developer
>> Subject: Re: [silva-dev] Override-layout for Silva 2.1
>>
>> you're probably right. although i have silva 2.1 in production i 
>> still use
>> the old layout mechanisms.
>>
>> but you could probably create a "welcome" xslt renderer which can then be
>> applied to the index_* pages individually (i.e. by hand: smi > properties
>> tab > settings): http://docs.infrae.com/silva/contents/xsltrender.html
>>
>> regards,
>> marc
>>
>>
>> On 01. Dez 2009, at 01. Dez 2009|11:12 Uhr, Luthiger Stoll Benno wrote:
>>
>>> Hmm...
>>> I have the impression that the index_html, content.html and
>>> override.html functionality is bypassed by the skinning mechanism 
>>> provided
>> by SilvaLayout.
>>> If I'm wrong: where are the layout product's page templates (in the
>>> file
>>> system) hooked into this index_html functionality?
>>>
>>> Regards,
>>> Benno
>>>
>>>
>>> -----Original Message-----
>>> From: silva-dev-bounces-IAPFreCvJWM6s/[email protected] 
>>> <mailto:silva-dev-bounces-IAPFreCvJWM6s/[email protected]>
>>> [mailto:silva-dev-bounces-IAPFreCvJWM6s/[email protected]] On Behalf Of Marc
>>> Petitmermet
>>> Sent: Dienstag, 1. Dezember 2009 10:55
>>> To: Silva Developer
>>> Subject: Re: [silva-dev] Override-layout for Silva 2.1
>>>
>>>> I have to implement a layout based on Silva 2.1 and the SilvaLayout
>>> product.
>>>>
>>>> The special point in this layout is that the welcome pages in 4
>>>> language
>>> versions have to be displayed in a slightly different layout.
>>>>
>>>> This is best accomplished using a override.pt (whereas the main part
>>>> of
>>> the site will use the layout's macro.pt).
>>>>
>>>> However, how can I make only the four Silva Documents (index,
>>>> index_FR,
>>> index_IT, index_EN) for the welcome page to be displayed using the
>>> override.pt?
>>>>
>>>> Or should I use a different approach for an override layout?
>>>
>>> you probably could add some intelligence into index_html script and
>>> have a more sophisticated if-clause...
>>>
>>> regards,
>>> marc
>>>
>>> <smime.p7s><ATT00001..txt>
>>
>> _______________________________________________
>> silva-dev mailing list
>> silva-dev-IAPFreCvJWM6s/[email protected] <mailto:silva-dev-IAPFreCvJWM6s/[email protected]>
>> https://lists.infrae.com/mailman/listinfo/silva-dev

_______________________________________________
silva-dev mailing list
silva-dev-IAPFreCvJWM6s/[email protected]
https://lists.infrae.com/mailman/listinfo/silva-dev
smime.p7s (application/x-pkcs7-signature, 3.9 KB) - not displayed