0

有谁知道如何将自定义字段链接到深度为 4 段的页面?

<td valign="top" align="center">Hotels:</td>
<td valign="top">{toursRelatedHotels}{title}{/toursRelatedHotels}</td>

我想链接{title}酒店领域的,我发现很难这样做。

我这样做的方式如下

{toursRelatedHotels}<a href="{title_permalink='destination/{toursRelatedCountries}{url_title}{/toursRelatedCountries}'}">{title}</a>{/toursRelatedHotels}

似乎在链接中看不到该国家/地区的 url_title。我还能怎么做?

4

2 回答 2

0

我通常使用(商业)附加结构构建站点,它允许您在几乎任何地方轻松使用 {page_url} 标记并避免许多 url 深度问题。

http://buildwithstructure.com/

于 2011-08-16T20:49:24.750 回答
0

你能给我们更多的信息,或者包括完整的模板代码吗?您是在尝试访问相关条目的 url_title 还是父条目?

当您尝试显示有关条目的信息时,ExpressionEngine 可能会有点有趣。通常最好的办法是在相关条目循环中嵌入一个新模板。

{toursRelatedHotels}

{embed="template_group_name/template_name" hotel_id="{entry_id}"}

{/toursRelatedHotels}

在这里查看更多信息 - http://expressionengine.com/user_guide/templates/embedding.html

于 2012-02-22T18:07:08.910 回答