1

I have seen a lot of implementations where the exp channel tag is used without specifying any channel or url, etc.

e.g.

{exp:channel:entries limit="1" disable="member_data|pagination|categories"} 

I have not built anything significant with EE yet and from all the material I have read so far, I have always been specifying the channel(s) that I wish to request information from.

So, how does this work exactly when no channel is in the tag - does it just take the last_segment or something?

Thanks for clearing up!!

1
  • 2
    If no channel is specified, it searches in all channels. It just a way of limiting the size of the search
    – Lloyd Hill
    Commented Sep 16, 2013 at 0:02

1 Answer 1

5

The channel entries tag is a bit special in that, by default, it looks at your URL to determine how and whether to filter the entries that it returns. You can switch off this dynamic behaviour with the dynamic="no" parameter.

Primarily, the tag will filter itself down to entries matching a url_title contained in segment_2 or segment_3 (bear in mind that url_titles are allowed to be duplicated if the entries are in different channels, so using limit="1" is a good safety net if you're displaying a single entry).

Secondly, the tag will filter itself further based on three extra factors that it looks for in the URL:

  • categories
  • dates
  • pagination

For a full explanation, take a look here:

http://www.jamessmith.co.uk/articles/expressionengine_url_schematic

ExpressionEngine URL Schematic

Your Answer

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

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