2015-10-07 1 views
0

Я зарегистрировал пользовательский вид для фасетной навигации, но я хочу переопределить слот описания.EEA Faceted Navigation: как переопределить описание?

В теле есть:

<metal:content-description fill-slot="content-description"> 
    <metal:block define-macro="content-description"> 
     My custom Description 
    </metal:block> 
</metal:content-description> 

<metal:content-core fill-slot="content-core"> 
    <metal:block define-macro="content-core"> 
     ... 

Но это не работает, у меня есть описание унаследованного вместо ... Содержания части работают.

Есть ли что-то, чего я не хватает?

ответ

0

Это не в обычном фасетном шаблоне предварительного просмотра, который вы должны добавить в описание.

Вам необходимо переопределить eea.facetednavigation.browser.template.view.pt и добавить описание.

<tal:left define="hidden python:request.set('disable_plone.leftcolumn', view.hide_left_column)" /> 
<tal:right define="hidden python:request.set('disable_plone.rightcolumn', view.hide_right_column)" /> 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" 
    lang="en-US" 
    metal:use-macro="here/main_template/macros/master" 
    i18n:domain="eea"> 

<metal:jsslot fill-slot="javascript_head_slot"> 
    <script type="text/javascript" 
    tal:content="string:jQuery(document).ready(function(evt){ 
     Faceted.Load(evt, '${context/absolute_url}/'); 
    });"></script> 
    <script type="text/javascript" 
    tal:content="string:jQuery(window).unload(function(){ 
     Faceted.Unload(); 
    });"></script> 
</metal:jsslot> 

<body> 

<metal:content-description fill-slot="content-description"> 
    <metal:block define-macro="content-description"> 
     <div class="documentDescription" tal:condition="context/rich_description"> 
      <tal:r tal:replace="structure context/rich_description">Description</tal:r> 
     </div> 
    </metal:block> 
</metal:content-description> 

<div metal:fill-slot="content-core"> 

<!-- Folder contents --> 
<div class="faceted-form" metal:define-macro="widgets" id="faceted-form" 
    tal:define="mode view/mode | string:view" tal:attributes="data-mode mode"> 

    <!-- Basic/Extended search --> 
    <div class="faceted-sections-buttons"> 
    <a href="#" class="faceted-sections-buttons-more" i18n:translate="">More filters</a> 
    <a href="#" class="faceted-sections-buttons-less" i18n:translate="">Less filters</a> 
    </div> 

    <metal:widgets use-macro="here/@@faceted_widgets/macros/widgets" /> 

    <!-- Faceted version --> 
    <div style="display: none" id="faceted-version" 
    tal:content="here/@@faceted_version|string:" /> 
    </div> 

</div> 
</body> 
</html> 
Смежные вопросы