Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hello Couchies!

I have a multilingual website where all pages are on the root level, which I want to change now and implement folders for different languages...
That is not a problem in itself, but I wonder if there is a way to "migrate" masterpages with all their cloned pages into the folder, without having to manualy copy all cloned pages?

now I have this situation:

root
|
| page-en.php (with blog)
| page_de.php (with blog)
| page_sh.php (with blog)

and I want to "migrate" as below:

root
|
| en/page-en.php (with blog)
| de/page_de.php (with blog)
| sh/page_sh.php (with blog)

Thanks in advance!

Tanja
Hi, a template, residing in a folder has a name in couch as 'folder/template.php'

Couch will sense the change if you follow this way and edit name in database directly with PhpMyAdmin. https://www.couchcms.com/forum/viewtopic.php?f=4&t=9608

Overall steps to complete:

1. create 2 copies of database: with /couch/gen_dump.php and a separate msql export of all tables inside PhpMyAdmin.
2. create respected physical folders and move your corresponding templates there. You will have physical folder on web server /en and in it your template page-en.php.
3. rename templates in phpmyadmin as indicated in that forum thread
3.1 rename couch calls on first line of each template to indicate new location of /couch folder. Something like '../couch/cms.php'
4. make sure you don't have .htaccess file messing around, rename it temporarily (this should be probably step 1.1, with turning off cache and pretty-urls in config.php)
5. now in admin panel it should work as before. But make sure you use relative links in your code with <cms:show k_site_link /> and <cms:link masterpage='template.php' />, because couch will serve new links automatically.
5.1 Enable cache/pretty-urls and regenerate htaccess with /couch/gen_htaccess.php, if you happen to use those.

I guess that will do it.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Hi trendoman,

thanks for the link to the topic with the procedure!... and for your time to outline all steps...

I'll give it a try!

best regards

Tanja
3 posts Page 1 of 1