Trying to edit Display Suite layouts and copied the ds_layouts folder to my subtheme but it doesn't seem to support overrides like the default DS layouts and throws a bunch of errors on cache flush.

Fatal error: Cannot redeclare ds_zf_4col_stacked() (previously declared in ...

How do I get around this to update the ZF DS layouts?

It occurred to me that maybe I shouldn't be touching this folder at all and maybe the answer is to just edit the layouts folder???
(The reason I'm trying to edit is that my Headers aren't showing up in the ZF layouts on a vanilla install and I'm trying to debug what is going on.)

Thanks!

Comments

oddible’s picture

Version: 7.x-2.x-dev » 7.x-4.0-beta1
oddible’s picture

Issue summary: View changes
oddible’s picture

Issue summary: View changes
Mirolim’s picture

You should rename ZF DS layouts and files accordingly.

oddible’s picture

You seem to be suggesting that the only way to edit the ZF DS layouts in the subtheme is to create completely new ZF DS layouts. Is that correct?

Mirolim’s picture

ZF DS layouts are used in parent theme and you can't declare same named layouts in child theme.
You can also delete ZF DS layouts from parent theme then DS will use ZF DS layouts from child theme but after theme update they will be added again.

chrisjlee’s picture

Mirolim is correct. It's preferred if you create your own DS layouts template files. You should not hack core.

chrisjlee’s picture

Status: Active » Fixed

Marking this as fixed for now. Feel free to change this if you would lke to discuss this more.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

thim’s picture

Simplest is to not "copy" but "move" the desired "ds_layout"/"zf_xxx" folder form the zurb_foundation theme folder to your subtheme folder.
Or move the whole "ds_layout" folder

That is at least how I solved it, thank to a tip from @aspilicious

move
zurb_foundation/ds_layout/zf_4col_stacked
to
yourtheme/ds_layout/zf_4col_stacked