Hi
Got a channel for static pages (using page uri’s) but when we close an entry the page then just shows as white, and no 404 is shown? Am I missing a setting somewhere?
TIA
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
April 06, 2011 12:39pm
Subscribe [2]#1 / Apr 06, 2011 12:39pm
Hi
Got a channel for static pages (using page uri’s) but when we close an entry the page then just shows as white, and no 404 is shown? Am I missing a setting somewhere?
TIA
#2 / Apr 07, 2011 12:54am
We would probably need to see some template code.
Is the whole page wrapped in the entries loop? Do you have require_entry=“yes” param on the entries loop and {if no_results}{redirect="404"}{/if} inside the entries loop?
#3 / Apr 07, 2011 5:17am
{exp:channel:entries channel="page" limit="1" status="open|Preview"}
{embed="/_includes/.header" entry_id="{entry_id}" advert_area="55"}
<div id="main_content">
<h1 class="first">{title}</h1>
<div class="block">
{page_content}
</div>
</div>
{embed="/_includes/.footer" advert_area="55"}
{/exp:channel:entries}Pretty simple static page code 😊
#4 / Apr 07, 2011 9:22am
Assuming you want it to redirect to a 404 page try this:
{exp:channel:entries channel="page" limit="1" status="open|Preview" require_entry="yes"}
{if no_results}{redirect="404"}{/if}
{embed="/_includes/.header" entry_id="{entry_id}" advert_area="55"}
<div id="main_content">
<h1 class="first">{title}</h1>
<div class="block">
{page_content}
</div>
</div>
{embed="/_includes/.footer" advert_area="55"}
{/exp:channel:entries}