I am hoping to parse the URL from the index.php page, and IF there is a file named ‘segment_2’ in my_template_group, I want to embed it. Otherwise, I would like to display something like a “File not found” message.
I tried:
{if segment_2==""}
{embed="my_template_group/the_default_content"}
{if:elseif segment_2}
{embed="my_template_group/{segment_2}"}
{if:else}
We don't have what you're looking for!
{/if}Instead of
{if:elseif segment_2}file_exists()and setting EE’s PHP Parsing Stage to “Input”?