문제

I'm a Pyro and CI noob, so sorry for any obvious omissions.

I'm building a site for a tour company. I've setup a stream with departure_locations and another with tours. Both have an assigned field called departure location name. I'm trying to output a list of tours under each location, but I can't figure out the where statement.

{{streams:departure_locations}}
  {{streams:tours where="`departure_location_name`='departure_location_name'"}}
    {{tour_name}}
  {{/streams:tours}}
{{/streams:departure_locations}}

I get a No Results from this though, even though there are definitely entries that should fit the where statement. Can anyone see where I've gone wrong? Thanks in advance.

I'm using PyroCMS v2.1.2. I've posted this in the PyroCMS forums as well.

도움이 되었습니까?

해결책

Looks like I figured it out using the syntax from this post: http://www.pyrocms.com/forums/posts/view_reply/16409

{{streams:tours where="`departure_location_name`='{{departure_location_name}}'"}}

다른 팁

I stacked this issue today and solved with include and include_by parameters like following:

{{ streams:tours include=departure_location_name include_by="departure_location_name" }}

Referred by PyroCMS Offical Document

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top