I’ve got what I assume to be a pretty standard setup for our site.
Home Page
Section 1
Page A
Page B
Page C
Section 2
Page D
Page E
Page F
I’ve created a weblog and template group for each Section. Each template group has a single template (index). To add a page to the section, you add an entry to that section’s weblog. So my URLs are something like http://domain.com/index.php/section_1/page_d/ which would show the page_d entry using the section_1 template. Good so far.
This doesn’t cover when someone goes to http://domain.com/index.php/section_1/ though, so I handled that by setting up an {if} that looks to see if segment_2 is blank, and if it is, deliver a pre-selected article. That works fine, but only if segment_2 is blank. As soon as someone makes a typo in the URL, or tries to go to a page that doesn’t exist, what gets displayed is a frankenstein amalgamation of the contents of EVERY entry in that weblog.
Personally, I’d prefer that EE deliver a 404-style error when someone enters an invalid URL, but at the very least, I’d like to prevent them from seeing this frankenstein page. How is everyone else dealing with this type of thing? Is there conventional wisdom there?
Thanks.