Currently using {url_title_path='blog/blog-entry}
for listing entries, but URL outputs /blog/blog-entry/listing-title
. I'd like the URL to be /blog/listing-title
. Can I do this using routes? What's best way to accomplish?
Add a comment
|
just use a href="blog/{url_title}" however, you'd have to add some segment checking in your blog template like {if segment_2 == ''}show overview{if:else}Show post{/if}
-
so essentially use the same template for both blog listings and single blog listing? – frshjb373 Dec 1 '16 at 17:52
-
Yeah. if you're on EE2, you might wanna use switchee for those if statements. In EE3 just use native if statements. However, switchee can still be handy with pagination and edge cases – Jelle Dijkstra Dec 1 '16 at 17:54