The idea of having a template group is interesting, but I’d love my URLs to just be http://www.site.com/about and www.site.com/archives - is this possible?
Thanks.
tom
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
July 26, 2007 2:46am
Subscribe [6]#1 / Jul 26, 2007 2:46am
The idea of having a template group is interesting, but I’d love my URLs to just be http://www.site.com/about and www.site.com/archives - is this possible?
Thanks.
tom
#2 / Jul 26, 2007 2:53am
Well, you can use the index page from each template group and it can look like what you want. An index page for a template group is like this /home/index but can be just /home.
Also, the new pages module can output a specific URL of your making despite the template group and template name. You can look into that too.
http://expressionengine.com/docs/modules/pages/index.html
#3 / Jul 26, 2007 4:15am
I’m only using Core right now (seeing if it EE will do what I want before buying), so the Pages module isn’t an solution for me. But it’s good to know that it exists.
My project is a newspaper that is issue-based, so ideally the URLs would be something like http://www.site.com/issues/date/sectionname/articlename, like www.site.com/issues/2007/07/25/news/todays_breaking_news_story (a different question than before, but still along the lines of URLs).
Can this be done with EE (and without a lot of modrewrite)?
Thanks.
tom
#4 / Jul 26, 2007 9:53am
AFAIK, there isn’t really any way to automatically include the date segments in your URL. I know that there are some forum topics on the subject, and that some folks have found workarounds—but the workarounds seem like they’re more trouble than they’re worth (to me, at least).
#5 / Jul 26, 2007 11:23am
Yep- that url structure is going to cause problems. What I might do- could each issue be a category? Then use ‘issue’ as your category indicator and cat names like Sept_08_07 - if you pipe the ‘main’ issue page through your index, you can use some conditionals to default to the latest category- then older category ‘main pages’ would look like mysite.com/issue/sept_09_97/.
#6 / Jul 26, 2007 10:23pm
Yes, that would work. But the articles also all have categories. So I want to go to http://www.mysite.com/sports and get the current issue’s sports, or http://www.mysite.com/20070604/opinion and get the opinion issues from that article.
Basically, it seems as if EE’s http://www.site.com/template_group/template/category_or_article_number is not sufficient for what I need. Which really sucks because I love everything else about EE - I just wish there were a way for more direct interaction with URLs. Also, it would make more semantic sense to me if URLs were modelled after the data that they describe instead of the way they are displayed. Something like http://www.mysite.com/section/subsection/category/subcategory/...etc…/article_name_or_number. Then each section or subsection could be linked to a template that dictates how it is displayed.
Maybe I’ll be really hack-y and go modrewrite all the way.
tom
edit: I just discovered two very interesting things that might make all of this possible. One is that you can get directly to the URL with segment variables (http://expressionengine.com/wiki/URL_Segment_Variables/) and the second is that an article can have multiple category groups - so the issue and section of the newspaper could both be categories. Now I just have to do some thinking as to how it will all work together…
#7 / Jul 26, 2007 11:25pm
Ahhh, you discovered what I was going to suggest…use a segment for the types of articles (sports, editorial, etc.). I would probably do it with a custom field (drop-down). The author would then just select that just like they would a category. You’d then use that in a conditional to display the article sections.
#8 / Jul 27, 2007 1:35am
Thinking it through is often the hardest part but it’s nice to know that EE makes the “doing” part a whole lot easier. 😊