Page 1 of 1

Duplicate blocks

Posted: Fri Nov 03, 2017 9:10 pm
by MrData
Hi
I tried to create clone of the gauges block so I could have some gauges in the header and some in the side panel.
I made a 2 copies of the gauges block folder, naming them gauges1 and gauges2. All I changed in the settings.php files was the Gauge order line $gaugeOrder = 'T,A,H,R,P; in one folder and $gaugeOrder = 'C,W,G'; in the other folder.
They showed up as installed blocks on the list but had no version number or 'edit settings' button.
What else would I need to change, besides making duplicate folders and custom settings, to do this?
Thanx

Re: Duplicate blocks

Posted: Fri Nov 03, 2017 9:45 pm
by Jachym
Hi,
this is mentioned in the wiki, blocks cannot be duplicated, only one instance/homepage. Copying and renaming the folders will only work in very few cases for the very simple blocks (not gauges). In such case you would need to also modify the Javascript otherwise it will clash and the homepage will fail to load correctly.