0
在此页面: http://build.jhousemedia3.com/pleasanton/shop/district-profile/stoneridge-shopping-center/ExpressionEngine:多渠道问题与自定义URL的
的URL进行格式化,像这样 http://build.jhousemedia3.com/pleasanton/[channel]/[template]/[query参数]
我运行的EXP:通道:使用URL的最后一段项查询(segment_4)
发生了什么事是,当我从这个URL运行它,我不能在数据从拉除特定购物区频道外的任何其他频道。如果我要将最后一段更改为/?id = 28(或类似的东西),我可以从多个通道中提取数据。
任何想法?
代码拉基于URL的购物区的轮廓:
{exp:channel:entries url_title="{segment_4}" limit="1" channel="shopping_districts"}
<h2 class="upper"><span class="greenlight">{title}</span></h2>
{if center_website}
<div class="greyroundbox right"><a href="{center_website}" class="external-link" target='_blank'>Visit the Website</a></div>
{/if}
<p>{shopping_center_description}</p>
<div class="clear"></div>
{/exp:channel:entries}
代码在任何业务数据
{exp:channel:entries channel="businesses"}
<li class="{switch='first|'}">
<p>
<a href="{path='pages/business-profile'}" class="main-title">{business_name}</a>
<a href="{path='pages/shopping-category'}" class="green-title">{categories_shopping}</a><br />
{if phone}
<strong>Phone</strong>: {phone}<br />
{/if}
<strong>Address</strong>: {address_1}<br />
{if address_2}
{address_2}<br />
{/if}
{city}, {state}, {zip}<br />
{if website}
<a href="{website}" class="grey"><em>{website}</em></a>
{/if}
</p>
</li>
{/exp:channel:entries}
听起来像一个非常具体的模板设置。发布居住在“区域档案”模板中的代码将是一大帮助。 – 2012-08-14 12:55:34