Ok, thanks, but if I add an extra condition with the no_results snippet, the known page also returns the specified error page:
{if segment_3 == ""}
{!--Display Strategic Communications Index--}
{!--Display SC Index--}
{exp:weblog:entries dynamic="off" site="default_site" weblog="sc" url_title="sc_index" limit="1" disable="member_data|categories|trackbacks|pagination"}
<h1 id="contenttitle">{title}</h1>
{body}
<?php /*Display latest entry date*/ if(({edit_date format="%Y-%m-%d"} > {entry_date format="%Y-%m-%d"})){ ?> Reviewed {edit_date format="%Y-%m-%d"}. <?php } else { ?> Reviewed {entry_date format="%Y-%m-%d"}.<?php } ?>
{/exp:weblog:entries}
{if:else}
{!-- SC individual entries --}
{exp:weblog:entries dynamic="off" site="default_site" weblog="sc" url_title="{segment_3}" limit="1" disable="member_data|categories|trackbacks|pagination" require_entry="yes"}
{if no_results}
{redirect="ums/errordocument"}
{/if}
<h1 id="contenttitle">{title}</h1>
{body}
<?php /*Display latest entry date*/ if(({edit_date format="%Y-%m-%d"} > {entry_date format="%Y-%m-%d"})){ ?> Reviewed {edit_date format="%Y-%m-%d"}. <?php } else { ?> Reviewed {entry_date format="%Y-%m-%d"}.<?php } ?>
{/exp:weblog:entries}
{/if}
In this case, the first condition (SC Index: the page that I know to exist) ALWAYS displays the redirected error page, even though I know that it exists. If I remove the no_results snippet from the other condition (SC individual entries), then the index page will display…But then I have no way of throwing the 404. That is the problem: no_results is not working like it is supposed to. It does not matter how I use the no_results: it always causes some sort of problem. Is it my template (displayed above), or perhaps something else?
TY.
Update: Switching to a simple conditional appears to work, however. The following variation on the above code will work for me:
{if segment_3 == ""}
{exp:weblog:entries dynamic="off" site="default_site" weblog="sc" url_title="sc_index" limit="1" disable="member_data|categories|trackbacks|pagination"}
<h1 id="contenttitle">{title}</h1>
{body}
<?php /*Display latest entry date*/ if(({edit_date format="%Y-%m-%d"} > {entry_date format="%Y-%m-%d"})){ ?> Reviewed {edit_date format="%Y-%m-%d"}. <?php } else { ?> Reviewed {entry_date format="%Y-%m-%d"}.<?php } ?>
{/exp:weblog:entries}
{/if}
{if segment_3 != ""}
{!-- SC individual entries --}
{exp:weblog:entries dynamic="off" site="default_site" weblog="sc" url_title="{segment_3}" limit="1" disable="member_data|categories|trackbacks|pagination" require_entry="yes"}
{if no_results}
{redirect="ums/errordocument"}
{/if}
<h1 id="contenttitle">{title}</h1>
{body}
<?php /*Display latest entry date*/ if(({edit_date format="%Y-%m-%d"} > {entry_date format="%Y-%m-%d"})){ ?> Reviewed {edit_date format="%Y-%m-%d"}. <?php } else { ?> Reviewed {entry_date format="%Y-%m-%d"}.<?php } ?>
{/exp:weblog:entries}
{/if}
So, perhaps the problem is related to the parse order of conditionals, or is it true that no_results will only work for single page templates or for simple conditionals? If so, is there any way to use no_results for templates with advanced conditionals (for example, including each conditional in a separate embed)? Ultimately, is there another recommended method for displaying 404 pages for segments beyond the template group/template?
TY!