0

因此,我仍在尝试弄清楚如何使用表达式引擎,并且我想创建一个频道中所有条目的列表,其中包括相应的类别。我可以按如下方式创建列表:

{exp:channel:entries channel="custom_channel"}
   <div style = "display:block;padding:10px;border-bottom:1px solid #999999;">
      <span>Title: {title}</span><br>
      <span>Date published: {entry_date format="%m/%d/%y"}</span><br>
      <span>Access: {access}</span><br>
      <span>Type: {type}</span><br>
      {!--Here is where I am trying to access the corresponding 
          categories for each of the entries--}
   </div>
   {paginate}
          <p>Page {current_page} of {total_pages} pages {pagination_links}</p>
   {/paginate}
{/exp:channel:entries}

因此,它目前所做的是遍历条目并创建为每个条目定义的 html。我尝试包含 {categories} 和其他相关标签,但没有成功。我在网上查过,并没有找到任何相关的东西。是否可以访问每个条目的相应类别?如果是这样,怎么做?任何帮助表示赞赏。谢谢。

4

1 回答 1

0

是的,您可以使用类别变量 pair。顺便说一句,如果您想加入 ExpressionEngine 社区,请将您的问题发布到expressionengine.stackexchange.com

于 2013-06-20T01:03:10.670 回答