3

we have a big issue with the following code:

{event_related_media:child_ids limit="2" status="Archived" channel="video" show_expired="no" show_future_entries="no"}

With the following code, I get all the children entries id. None of the parameters are used to filter the results.

The official doc says explicitly that child_ids tag "supports almost all of {exp:channel:entries}’ tag parameters", but, well, no...

To be sure, I debug all SQL requests of the template, and whatever I used as channel name parameter (for instance, 'foo'), 'foo' is never used in any sql query.

Any idea?

Pv

1 Answer 1

5

That’s an error in the documentation, and we’ll get that fixed. :child_ids only supports filtering entries with the following parameters:

  • var_id
  • var
  • element_id
  • field_id
  • field
  • col_id
  • col
  • row_id
  • child_id
  • parent_id

If you need anything else, and you should just use a tag pair:

{event_related_media
    limit="2"
    status="Archived"
    channel="video"
    show_expired="no"
    show_future_entries="no"
    backspace="1"
}{entry_id}|{/event_related_media}
1
  • Thanks Brandon, the workaround works well, even if the request is a bit slower.
    – pvledoux
    Dec 6, 2013 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.