0

The footer of my site needs to pull through the 6 most recent Case Studies. Here is the code, embedded in a template file for the footer of the site:

<li><strong>Case Studies</strong></li>
{exp:channel:entries channel="case_studies" limit="6"}
    <li><a href="{path="case_studies/case_study/{url_title}"}">{title}</a></li>
{/exp:channel:entries}

Nice and simple, right?

This works perfectly on my homepage and under some URLs, but not all of them. For example, when I visit http://example.com/about/latest_news it will appear, as will http://example.com/press_articles/ - but http://example.com/services doesn't.

Is there anything obvious setting or reason for this?

Thanks!

4

Yep, add dynamic="no" parameter to the channel:entries tag :)

1
  • Brilliant. Thanks, I'm a bit of a beginner! – Jack Feb 13 '13 at 14:38
1

This is easy: You need dynamic="off" on your exp:channel:entries tag.

EE automatically filters entries based on the URL, expecting that to contain entry IDs or URL Titles.

3
  • The other answer says dynamic="no" rather than off, which seems to work, but thanks for answering promptly. – Jack Feb 13 '13 at 14:38
  • Edit: Interestly, both off and no work the same... – Jack Feb 13 '13 at 14:39
  • 2
    Yeah, off used to be the value set in EE1.x, which carried over but is not documented. – Siebird Feb 13 '13 at 14:42

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.