Opening an new post from
https://www.couchcms.com/forum/viewtopic.php?f=5&t=11512&p=39728&hilit=mosaic+group#p39728
Admittedly, I did not follow up with your request on this post because I thought that since you weren't able to replicate the issue, it must be something on my end. However, the same site I gave you access to recently also has this problem, so I can easily point out where if the code below isn't sufficient.
PROBLEM: I'm finding there to be inconsistent behavior with conditionally configured type='groups' showing and hiding when conditions are met, but only when in mosaics and only groups.
I looked at this
The basic problem is that in a mosaic, I cannot get 'groups' to show/hide consistently. To be sure, I change the editable from 'group' to 'row' and everything works correctly. Whenever I change the respective editable back group, sometimes it will show, sometimes it won't, sometimes it works after I save the tile and re-edit depending on the show/hide settings. But for the most part, groups don't respond correctly to the conditional condition, if they respond at all.
I don't have this issue with groups not built in a mosaic and I don't have this problem with any other editable (rows, editables, repeatables inside mosaics. I'm only finding the behavior with type='groups' inside mosaics. I have copy/pasted the exact same code to regular templates (not in mosaics) to be sure and the groups respond as configured.
QUICK SUMMARY: I can build conditional type='groups' to show/hide in a regular clonable or non-clonable template and they will work correctly. I can copy/paste that same code into a template inside a mosaic (changing the names and verifying the order is correct) and the groups do now show/hide as expected. Once I change 'group' to 'row' inside the mosaic, the 'row' will show/hide as directed by the conditional.
Here is my mosaic code:
Here is my conditional code:
here is the conditionals (amended for brevity):
All 3 of these will show/hide correctly when the editable is 'row' but when it's 'group', they do not show at all.
Does anyone else have this issue with groups inside mosaics? Is this perhaps a bug?
https://www.couchcms.com/forum/viewtopic.php?f=5&t=11512&p=39728&hilit=mosaic+group#p39728
Admittedly, I did not follow up with your request on this post because I thought that since you weren't able to replicate the issue, it must be something on my end. However, the same site I gave you access to recently also has this problem, so I can easily point out where if the code below isn't sufficient.
PROBLEM: I'm finding there to be inconsistent behavior with conditionally configured type='groups' showing and hiding when conditions are met, but only when in mosaics and only groups.
I looked at this
- Code: Select all
https://www.couchcms.com/forum/viewtopic.php?f=4&t=13621
The basic problem is that in a mosaic, I cannot get 'groups' to show/hide consistently. To be sure, I change the editable from 'group' to 'row' and everything works correctly. Whenever I change the respective editable back group, sometimes it will show, sometimes it won't, sometimes it works after I save the tile and re-edit depending on the show/hide settings. But for the most part, groups don't respond correctly to the conditional condition, if they respond at all.
I don't have this issue with groups not built in a mosaic and I don't have this problem with any other editable (rows, editables, repeatables inside mosaics. I'm only finding the behavior with type='groups' inside mosaics. I have copy/pasted the exact same code to regular templates (not in mosaics) to be sure and the groups respond as configured.
QUICK SUMMARY: I can build conditional type='groups' to show/hide in a regular clonable or non-clonable template and they will work correctly. I can copy/paste that same code into a template inside a mosaic (changing the names and verifying the order is correct) and the groups do now show/hide as expected. Once I change 'group' to 'row' inside the mosaic, the 'row' will show/hide as directed by the conditional.
Here is my mosaic code:
- Code: Select all
<?php require_once( '../comm_admin/cms.php' ); ?>
<cms:template title='Page Hero Catalog' parent='_mods_' icon='cog' clonable='0' order='1000' >
<cms:mosaic name='hero_block_msc' label='Hero Block' body_class='_pb'>
<cms:tile name='hero_clr_tile' label='Hero Color Background' _pb_template='hero/theme/hero_color' _pb_height='350'>
<cms:embed 'pb_mods/hero/embed/hero_format.htm' />
<cms:embed 'pb_mods/hero/embed/hero_txtblk_txt.htm' />
</cms:tile>
</cms:mosaic>
</cms:template>
<?php COUCH::invoke(); ?>
Here is my conditional code:
- Code: Select all
<cms:editable type='dropdown' name='hero_txtbx_opt' label='Header Text' desc=''
opt_values='Text=0|Image=1|Form=2'
class='col-md-2'
order='117'
/>
<cms:func _into='hero_txtblk_txt_chc' hero_txtblk_blk_opt=''>
<cms:if hero_txtblk_blk_opt="0" >
show
<cms:else />
hide
</cms:if>
</cms:func>
<cms:func _into='hero_txtblk_img_chc' hero_txtblk_blk_opt=''>
<cms:if hero_txtblk_blk_opt="1" >
show
<cms:else />
hide
</cms:if>
</cms:func>
<cms:func _into='hero_txtblk_form_chc' hero_txtblk_blk_opt=''>
<cms:if hero_txtblk_blk_opt="2" >
show
<cms:else />
hide
</cms:if>
</cms:func>
here is the conditionals (amended for brevity):
- Code: Select all
<cms:editable type='group' name='hero_txtblk_text_grp' label='Input Text For Hero' not_active=hero_txtblk_txt_chc order='302'>
<cms:repeatable name='hero_txtbx_txt_rpt' label='Header Text Lines - New Row = New Line' stacked_layout='1' order='305' >
<cms:editable type='text' name='herotxt_ln' label='Text'
order='307'
/>
</cms:repeatable>
</cms:editable>
<cms:editable type='group' name='hero_txtblk_img_grp' label='Input Text For Hero' not_active=hero_txtblk_img_chc order='375'>
<cms:editable type='image' name='hero_txtblk_img' label='Upload Image for Text' desc='1:1 ratio max h or w will be enforced at 500px'
width='500'
height='500'
enforce_max='1'
show_preview='1'
preview_width='75'
not_active=hero_txtbx_img_chc
order='378'
/>
<cms:editable type='text' name='hero_txtblk_img_alt' label='Text Image Alt Description' desc='for screen readers' not_active=hero_txtbx_img_chc order='380' />
</cms:editable>
<cms:editable type='group' name='hero_txtblk_form_grp' label='Input Text For Hero' not_active=hero_txtblk_form_chc order='502'>
<cms:editable type="text" name="hero_txtblk_text_title" label="Form Title" desc="form subject"
order='504'
/>
<cms:editable type="text" name="hero_txtblk_form_para" label="Form Byline" desc="" order='508' />
<cms:editable type='dropdown' name='hdr_frm_ttl_txt_clr' label='Form Title Color'
opt_values='dropdowns/colors.htm'
dynamic='opt_values'
order='510'
/>
</cms:editable>
All 3 of these will show/hide correctly when the editable is 'row' but when it's 'group', they do not show at all.
Does anyone else have this issue with groups inside mosaics? Is this perhaps a bug?