forrest
forrest

Reputation: 10982

Expression Engine - Why don't "includes" show on Segment_3 + templates?

I am working on a site where most of the templates are segment_1 or segment_2 level. On these the footer content (which is an includes file) displays properly.

Example: http://yogahealthfoundation.org/get_involved/studios_and_teachers

However, on a segment_3 page, that same content does not show properly.

Example: http://yogahealthfoundation.org/blog/entry/must_read_for_every_yogi

Here is the html:

<div id="footer">
<div id="footer-buffer"></div>
<div id="footer-content">
{exp:channel:entries channel="misc" url_title="copyright_notice" }
<p>Copyright © 2007&ndash;{current_time format="%Y"} by {details}</p>
{/exp:channel:entries}
</div><!-- end footer-content -->
</div><!-- end footer -->
</body>

Here is how I am including it with EE tags:

{embed="includes/html_footer"}

The embed is done the same all segments regardless. Any clues why the content is not displaying properly on segement_3 + template pages?

Thanks!

Upvotes: 0

Views: 357

Answers (1)

Derek Hogue
Derek Hogue

Reputation: 4564

Your footer Channel Entries tag is seeing a third segment (which EE generally considers to represent either an Entry ID or URL Title), and is looking for an entry in the "misc" channel with the URL Title of whatever {segment_3} is.

The solution is to add dynamic="no" to your footer Channel Entries tag, causing it to completely ignore any filtering triggered by the URL segments.

Upvotes: 1

Related Questions