2011-05-04 2 views
1

plone 4.0.1 + collective.xdv 1.0rc11을 사용하고 있으며 다른 테마를 사용해야합니다.collective.xdv - 기본 테마에 대한 대체 테마 나누기 정의

in a recent question/answer으로 설명하려고했으나 조건이있는 새 테마를 삽입 할 때 기본 테마로 변환되지 않습니다. 이 동안

Traceback (innermost last): 
    Module ZPublisher.Publish, line 132, in publish 
    Module zope.event, line 23, in notify 
    Module zope.component.event, line 26, in dispatch 
    Module zope.component._api, line 138, in subscribers 
    Module zope.component.registry, line 323, in subscribers 
    Module zope.interface.adapter, line 575, in subscribers 
    Module plone.transformchain.zpublisher, line 93, in applyTransformOnSuccess 
TypeError 

:이 끝나는

<rules css:if-content="body.section-mysection"> 
    <theme href="mysection.html" /> 
</rules> 

: 여기에 몇 가지 내가 뭘하려의 예입니다

<theme href="mysection.html" if-path="/mysection/"/> 

<theme href="mysection.html" css:if-content="body.section-mysection"/> 

주어진 섹션하지만 포털의 나머지 부분에 대한 두 작업 전혀 변형이 없다.

심지어 rules.xml에 기본 테마를 지정하려고했는데 (이미 @@ xdv-settings에 등록되어있는 경우에도) <theme href="index.html" />으로 등록되었지만 운이 없었습니다.

무엇이 여기에 있습니까? 나는 당신의 설정 및 전체에 특정 문제 확장을 이해한다면 미리

감사합니다, SIMO

답변

2

먼저 plone.app.theming으로 이동하는 것이 좋습니다. 필자가 이해하고 (pa.a.theming) collective.xdv에서 개발 된 모든 최신 기능을 제공하므로 업그레이드/변경 작업은 매우 간단합니다 (http://pypi.python.org/pypi/plone.app.theming#migrating-from-collective-xdv). 변경 조건 (들)을 추가 한 후 그냥 기본 테마 처음를 구성 할 필요가 같은

그것은 사운드 및 :

둘째,이 문서를 참조 할 것 조건이 일치 할 때 적절한 섹션. 추가로 일치하는 테마는 "기본"(첫 번째로 일치하는) 테마에 영향을 주어서는 안됩니다.

+0

안녕 Alex, 고마워! 내가 시도해 보겠지 만, "plone.app.theming은 Plone 4.1 이상에서 작동한다."라고 말하고있다. 알고 계신가요? – simahawk

+0

오, 안돼, 미안 해요. 4.1 집합 xdv는 여전히 최선의 선택입니다. – aclark

+0

plone.app을 얻을 수 있어야합니다.적절한 KGS로 Plone 4.0을 다루는 테마이지만, 나 자신을 유지할 시간이 없으며 Plone 4.1이 바로 근처에 있습니다. –

1

나는 확실하지 않다, 그래서 난 그냥 작업 예제를 게시 할 수 있습니다. 참고 : xdv 제어판에서 default theme 값을 사용하지 않습니다. 어쨌든 plone.app.theming으로 사용되지 않습니다. 또한 rules.xml의 테마 템플리트를 직접 설정하는 데 방해가되는 것으로 보였습니다.이 템플리트는 사용자의 특정 문제점/용도와 관련 될 수 있습니다.

<rules 
xmlns="http://namespaces.plone.org/xdv" 
xmlns:css="http://namespaces.plone.org/xdv+css" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

<theme css:if-content="body.section-front-page" href="frontpage.html"/> 
<theme css:if-content="body.section-contact" href="contact.html"/> 

<!-- Only style actual Plone page and exclude things like /manage --> 
<rules css:if-content="#visual-portal-wrapper"> 

    <!-- default theme templates --> 
    <theme href="theme.html" /> 
    <!-- Add your default transform rules here --> 
    <rules css:if-content="body.section-contact"> 
     <!-- Theme template is already setup on top of this file --> 
     <!-- Add section specific rules here --> 
     <drop css:theme="#sidebar" /> 
    </rules> 
</rules> 
</rules> 

이 규칙

은 디아/plone.app.theming에 필요한 설정에 최대한 가까운 단지 (예를 들어 append/ after에 대한 대체/네임 스페이스 수정 및 검색) 약간의 조정이 필요합니다 - 그냥 이 예제가 Plone4.1/diazo로 옮겨진 사이트를 주요한 단점없이 마이그레이션했습니다.

+1

안녕하세요, xdv-settings에서 테마 파일 설정을 제거하려고 시도했는데이를 내 rules.xml에 넣었습니다. '''두 번째 코드에서만 작동합니다. 만약 내가 다른 곳으로 가면 나는 전혀 변형시키지 않는다. ( – simahawk