Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
5 posts Page 1 of 1
Hi folks!
Let's assume you have a clonable template with a lot of fields - text and images - which changes just a little for each "child" pages. To fill all the info for each page will be a tedious and boring task, so I did this mod, which will allow you to duplicate an existing page, with all the existing info. The newly created page will have "Cloned ABCDE" (where ABCDE represents 5 random characters) string appended to original name. See pic below.
Clipboard01.jpg
Clipboard01.jpg (62.77 KiB) Viewed 3426 times

In order to install this mod you will have to extract the archive to Couch main folder.
Please note!!!:
********************************************************************************************************
• backup existing "edit-pages.php" before replacing it with the one modded by me;
• I only tested it - for about 3 months, with no glitches - in Couch 1.4.7;
• you have to manually replace the generated name.

********************************************************************************************************
To use it just click on the new blue-ish icon ;) I hope you will find this mod useful.
Thanks to KK for developing CouchCMS and Trendoman for invaluable help!
edit_pages.zip
(24.18 KiB) Downloaded 689 times
Thank you so much for posting this mod. You did a wonderful job.

I think it would be of value to amend the random chars decision. I understand the intentions and support the concept of auto-naming 100%.

Just a little change maybe to have a current date and time as the clone marker. It would perhaps help later to manage multiple clones without going into Advanced settings of each of them to see when clone was created. Should be a very easy change if anyone wants it this way I could certainly put a php Date() function into it.

Look forward to have more mods posted by yourself.
what about mod for couch 2?
I'd be happy to have this in Couch 2.x. Would this also clone mosaic and repeatables as well?
@olliwalli, an addon for 2.x already exists -
viewtopic.php?f=8&t=11545

And yes, it will clone mosaic and repeatables as well.

Hope it helps.
5 posts Page 1 of 1