Forum for discussing general topics related to Couch.
8 posts Page 1 of 1
I've created a clonable template called blogitem.php, which is a single blog item template and is displayed in a repeat block on page blog.php.

Blog items are categorised.

The pretty URL for one of my blog items is:

mysite.com/blog/blogitem/category/this-is-my-blog-item.html

How can I get it to not include the "blogitem" part in that URL?

TY!
I wonder why you chose to use a separate template for the blog items when you already had one named blog.php?

As demonstrated in the Aurelius tutorial, the recommended approach is to make the 'blog.php' template itself clonable and use it to create the blog items. The 'home-view' (and the 'folder-view' if needed) is then used to list the blog-items while the 'page-view' suffices for showing a discrete blog post.

I'd suggest you please refactor your solution to the use the aforementioned method. This way you'll have URLs like this -
mysite.com/blog/category/this-is-my-blog-item.html
Did it this way because the blog homepage and the blog item pages are complex and very different from each other (different surrounding content, includes, etc etc).

No way to resolve without refactoring?
because the blog homepage and the blog item pages are complex and very different from each other (different surrounding content, includes, etc etc
Nothing that a judicious use of <cms:embed>s cannot handle, I think.

Anyway, I am sorry but a separate template will necessarily show its name in prettyURLs. I do not see an alternative to reorganising things a bit.
Ok. Am I correct that, as I already have a large number of blog entries added (including complex rich content) which would take eons to re-create, the best way forwards is to keep the blogitem.php template and add to it the code for the blog homepage, and then remove the existing blog.php?

I presume there's a way to then rename blogitem.php to blog.php?

TY!!!
I presume there's a way to then rename blogitem.php to blog.php?

Please take a look at the following post -
viewtopic.php?f=4&t=7232#p9880
Essentially we are doing only this -
viewtopic.php?f=4&t=9608

Do make sure to take a database backup first (just in case).

Hope this helps.
Nice one, thank you :)
KK wrote:
I presume there's a way to then rename blogitem.php to blog.php?

Please take a look at the following post -
viewtopic.php?f=4&t=7232#p9880
Essentially we are doing only this -
viewtopic.php?f=4&t=9608

Do make sure to take a database backup first (just in case).

Hope this helps.


Bookmarking those two posts. Thank you!

This answer should really need be highlighted somewhere among "special tips and solutions".
I'm 100% sure i'm not the only one having encountered this situation and lost some data.... :)
8 posts Page 1 of 1