Duplicate singelton

I can duplicate entry

I can duplicate collection

HOW DUPLICATE SINGLETON?? :slight_smile:

There is no easy method, yet.

You can copy and paste the field definitions from /storage/singleton/old.singleton.php to /storage/singleton/new.singleton.php. Now the fields are cloned.

If you want to clone the data, too, just get the data from the old one and save it to the new one.

The PHP way:

// get data from singleton "old"
$data = $app->module('singletons')->getData('old');

// save data to "new"
$app->module('singletons')->saveData('new', $data);

Here is a simple way to save singletons via api:

Yes… Understand Thanx…