Re: Override-layout for Silva 2.1
ccaadgi <d.gillies-hclig2XLE9Zaa/[email protected]> Fri, 04 Dec 2009 08:33:29 +0000
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
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