1

I have a very weird behaviour: One of my channels does not show any entries on one specific template site.

I use the following EE tag:

{exp:channel:entries channel="gallery_slider" category="6" limit="1"}test output{/exp}

When I use this code in the one specific template, it does not show test output. I made sure, that I have content in the channel with the category: I used the tag within another template, where the test output is shown as expected.

In the problematic template I use another channel, which is showing its content correctly.

I have no idea what could lead to this behaviour as both templates are nearly identical.

  • I don't use the channel within the other channel
  • both templates (the working and the non working template) use each two different channels
  • In one template the channel gallery_slider outputs content
  • In one template the channel gallery_slider does not output content
  • both templates have a url defined via template route manager

Any ideas, what could lead to the missing content?

  • Try adding dynamic="no" to your parameters. – BrandonOHara Nov 12 '15 at 18:45
  • where do i do that? to which parameter? of the channel or the category? – Rias Nov 12 '15 at 18:48
  • {exp:channel:entries channel="gallery_slider" category="6" limit="1" dynamic="no"} – BrandonOHara Nov 12 '15 at 18:49
  • Oh cool, that works, why is that? I can't find a documentation to dynamic="no". Thank you, Brandon! – Rias Nov 12 '15 at 18:54
  • Glad to help. I added an answer and response to below if you want to accept it. – BrandonOHara Nov 12 '15 at 18:58
2

Add dynamic="no" to your parameters like this

{exp:channel:entries channel="gallery_slider" category="6" limit="1" dynamic="no"}
    test output
{/exp:channel:entries}

ExpressionEngine tries to determine the entry_id or url_title by itself, and if that id isn't part of that channel it won't show anything.

Here's a link to the docs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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