I have a template set up that I point various Channel Entries to via a pages URL. For example, I might have a channel on my site that contains all the various pages for a department, and all those channel entries point to a single template. That template, of course, shows whatever channel entry gets pumped its way.
I'm noticing that I'm never getting a 404 when an invalid URL is typed in; the template just serves a piece of content off the stack from the channel. So if I go to /whatever/labs I'll see the content I expect there. If I go to /whatever/labsARG I'll see some random content pulled from the channel, but never the 404.
I think the problem is that the template as set up is told to fetch an article/page from the channel - so if it isn't passed on explicitly it fetches one.
{exp:channel:entries channel="pathology_content" limit="1" require_entry="yes"}
Any thoughts? Is there a way to designate this a Pages only template - ie, only show content if it's incoming from a Pages URL, otherwise 404?