I’m in the midst of a multi-month process of moving an existing site into ExpressionEngine. There’s a use pattern that I keep encountering (and putting off figuring out how to employ) that probably indicates that I’m not doing things the ExpressionEngine way.
Our site contains essays about every president. For all 43 of them we’ve got “A Life in Brief,” “Domestic Affairs,” “Foreign Affairs,” “Impact and Legacy,” etc. Ten in all. And we have an appropriate URL structure. example.com/president/ is a listing of the presidents, example.com/president/washington/ is a listing of essays about George Washington, and example.com/president/washington/life-in-brief/ is the “Life in Brief” essay about Washington.
The trick is porting this to EE. I’ve established a channel called “Essays.” Each essay has a channel field called “Essay Type,” a select field where one can pick from any of the available essay types. And each essay has a channel field called “President,” a relationship field where one can pick from the presidents. Those two elements are, at least logically, all of the information that needs to be stored to be able to retrieve these essays via that URL and ensure that they are unique.
The problem here is the URL Title field, which EE requires be unique per channel. Obviously, I don’t want a redundant URL like /president/washington/washington-life-in-brief/. I just want /president/washington/life-in-brief/. I’d hate to have to use the Pages module to manually specify a URL for every one of these essays.
Rather than ask about how to work around the requirement that URL Titles be unique within each channel, I get the sense that I’m doing something wrong here—that I’m thinking of this problem in an un-EE way. Should I be using “Categories” for this? Would that make any difference? Am I doing this all wrong? Or is this URL structure simply not how EE does things?
I can surely work around all of this with mod_rewrite, but it’d be nice to have EE producing pages at the paths where I actually intend to use them, with URL slugs that I really intend to use, etc. I’d be grateful for any guidance about what I’m doing wrong.