Kentico Repeater选择项目转换

时间:2016-02-12 18:16:51

标签: kentico

我遇到了两个中继器的问题,两者都使用相同的选择项转换。每个中继器都由一个单独的页面数据源提供,因为我也有分页。

当选择来自转发器1的项目时,我会看到备忘录数据,还有转发器1表头和所有转发器2的表。是否可以为此设置新的页面模板,并在那里显示备忘录详细信息?

这是备忘录登陆页面: Memo Landing 这是详细页面: Memo Detail

这里是转换代码:



<section id="memoDetail">
  <h1>Memorandum</h1>
  <ul id="memoHeader">
    <li><span class="headerLabel">To:</span> {% To %}</li>
    <li><span class="headerLabel">From:</span> {% From %}</li>
    <li><span class="headerLabel">Subject:</span> {% Subject %}</li>
    <li><span class="headerLabel">Date:</span> {% Date %}</li>
  </ul>
  <div id="memoDetails">{% Details %}</div>
</section>
&#13;
&#13;
&#13;

2 个答案:

答案 0 :(得分:2)

我相信您对商品列表和详细信息页面使用相同的页面模板。答案是肯定的,您可以为这些页面设置不同的模板。在这种情况下,您必须使用新模板更新转发器中显示的每个页面。 但是,这不是必需的:您可以尝试隐藏第二个中继器,例如,基于页面类型,如果转发器显示不同类型的页面,或在那里放置一些可见性宏。 我不确定为什么标题出现在第二个屏幕截图上 - 转发器设置应该有问题。

答案 1 :(得分:0)

Mark, there is a way to force all the content for a page type to be display using a dedicated template. Go to Page Types app > select the page type > General > New page settings > Default page template, and set it there. This way, it doesn't matter where the items are listed by whatever repeaters, they will be displayed with the same template.