EEA分面导航:如何覆盖描述?

时间:2015-10-07 09:28:19

标签: plone faceted-search

我已经为分面导航注册了自定义视图,但我想覆盖描述槽。

我的身体:

<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">
        ...

但这不起作用,我已经获得了遗留描述......内容部分正在运作。

我有什么遗失的吗?

1 个答案:

答案 0 :(得分: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>