0

Is it possible to effectively bypass the template-group/template structure and have urls such as:

domain.com/{url_title}

where the entry url title is obviously the first segment. Is it even doable and what would be the most efficient and easiest way of doing it? I guess it would need an add-on but I can't seem to find one. It's for a very small site with just two separate template pages and perhaps 10-20 entries.

Would the Pages module be any good for this?

4

Like, multiple different ways, depending on what you want to do.

One way:

{!-- template: teamplate.group/index.html (default template group) --}

{exp:channel:entries
    {if segment_1}
    url_title="{segment_1}"
    {if:else}
    url_title="home-page-entry-url-title"
    {/if}}

    ... maybe use a homepage partial here if no segment 1, otherwise use a segment 1 partial ...

{/exp:channel:entries}

Another way: Use template routes: https://docs.expressionengine.com/latest/templates/routes.html

Another way: Use the Pages module to assign specific entries to specific URLs.

Another way: Purchase the Structure add-on and assign entries (better than the Pages module if you have a lot (20+) entries you want to work with).

There are other ways as well that I can't think of off the top of my head. If you expand on your question on why you want to do this, how many entries we are talking about, etc.. (more context please) we can help you better.

| improve this answer | |
  • 1
    Thanks for the reply. I think I'd want to go with Template Routes.There will be about 50 - 70 entries. Essentially I want to lose the template_group/template segments 1 & 2 and have the url_title normally in segment_3 as the first one. Like so: domain.com/{url_title} But can't seem to make it work with the Template Routes. Is there a tutorial anywhere? Not sure the documentation is that clear – segovius May 17 at 12:01
  • I'm using ressource router, more easy to use. For me too the documentation of EE routes is unclear. devot-ee.com/add-ons/resource-router – Stéphane Jun 4 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.