Duplicate blocks

Post Reply
User avatar
MrData
Observer
Observer
Posts: 39
Joined: Tue Oct 31, 2017 3:02 pm
Location: Southeast Wisconsin, USA
Station model: Davis Vantage Pro II
Software: Meteobridge
Contact:

Duplicate blocks

Post by MrData » Fri Nov 03, 2017 9:10 pm

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
HEALTH WARNING: Caution...these posts may contain traces of nut.
Image
My Meteotemplate Weather Station

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Duplicate blocks

Post by Jachym » Fri Nov 03, 2017 9:45 pm

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.

Post Reply