Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
I have alot of templates using filenames like our_offer.php with full filled content via CMS.
But my clients need URLs in format our-offer/something.
When I change filename, I need to fill all pages from scratch (almost 1k pages etc).
How can I change only urls?

Also, there is any way to remove .html extensions from clonned pages via prettyurls?
I know that templates can be renamed safely in db, because a tpl is related to its pages only through its ID, which stays the same. There are topics if unsure. Next, "html" extension is not appearing for nested-pages templates. I did not see your template to test things for 100% assurance, but I think it is safe to set template as nested_pages='1' without data loss. I suggest a little test on a different temporary template to confirm. Htaccess will not help to get rid of extension

your best friends: github, StackOverflow, telegram
Hi, reopening an old topic here.

I am also looking for a way to remove .html from the pretty url. I am using dynamic folders, therefore I cannot use nested_pages aswell.

Is there another way to remove .html from the URL?
Hi @Saskia,

Couch, out-of-the-box, offers only a fixed pattern of URLs - the one for normal pages requires the .html extension.
However, if you are willing to put in some effort, you may forgo Couch's patterns entirely and define your own using 'custom routes' -

Please be aware that, if you choose to do so, none of Couch's well know 'views' (e.g. page_view, folder_view etc.) will be recognized - you'll have to define your own. And then, probably, since you are using folders as well you'll face the same dilemma that Couch has - if there is no '.html' (or any other) extension, how will you differentiate between a 'folder' and a 'page' in a URL? e.g. in is 'bar' a folder or a page?

If you have a fixed number of folders or a well defined hierarchy then perhaps it can be done but, as you can appreciate, it cannot be a generic solution.

Hope this helps.
4 posts Page 1 of 1