小编Mat*_*ith的帖子

ExpressionEngine:帮助w /订购反向相关条目

我对一些反向相关条目的排序遇到了一些问题.EE只有一些限制,我正在寻找快速解决方案.您将提供任何帮助,我们将不胜感激.

我有两个渠道:注册和学生.学生有一个关系字段,将每个条目链接到注册渠道中的条目.(我需要继续使用EE关系字段.)

学生频道分配了两个类别组:成绩(组#1)和乐器(组#2).类别ID#1-6属于成绩类别.

以下代码实现了我需要它做的一半:

{exp:channel:entries channel="registrations" entry_id="{segment_4}" dynamic="no"}
<table>
{reverse_related_entries channel="students"}
{categories show="1|2"}
 <tr>
  <td><?php print $count; ?>.</td>
  <td>{title}</td>
  {embed="_includes/student_print" student_id="{entry_id}"}
 </tr>
{/categories}
{/reverse_related_entries}
</table>
<table>
{reverse_related_entries channel="students"}
{categories show="3|4"}
 <tr>
  <td><?php print $count; ?>.</td>
  <td>{title}</td>
  {embed="_includes/student_print" student_id="{entry_id}"}
 </tr>
{/categories}
{/reverse_related_entries}
</table>
<table>
{reverse_related_entries channel="students"}
{categories show="5|6"}
 <tr>
  <td><?php print $count; ?>.</td>
  <td>{title}</td>
  {embed="_includes/student_print" student_id="{entry_id}"}
 </tr>
{/categories}
{/reverse_related_entries}
</table>
{/exp:channel:entries}
Run Code Online (Sandbox Code Playgroud)

这是student_print嵌入:

{exp:channel:entries channel="students" entry_id="{embed:student_id}" dynamic="no"}
<td><font size="2">{categories show_group="2"}{category_name}{/categories}</font></td>
<td><font size="2">{categories show_group="1"}{category_name}{/categories}</font></td>
{/exp:channel:entries}
Run Code Online (Sandbox Code Playgroud)

现在 - 我需要它做的是通过仪器类别组(组#2)中类别的CUSTOM ORDER命令反向相关条目.我只是不知道如何去做我目前正在做的事情(显示三个表 - 每个表显示来自组#1中特定类别的条目)并将它们放入组#2中类别的自定义顺序.

再次 - …

expressionengine

7
推荐指数
1
解决办法
414
查看次数

标签 统计

expressionengine ×1