Forum for discussing general topics related to Couch.
7 posts Page 1 of 1
I try to embed into a tile, but this seems not to work.

var.html
Code: Select all
<cms:editable
    name='section_background' label='background' type='dropdown' order='10'
    opt_values='blue=#00f | white=#fff |green=#0f0 | black=#000' />

mosaic.html
Code: Select all
<cms:mosaic name='ce' label='Content'>
  <cms:tile name='text' label='text'>
    <cms:embed 'var.html'/>
    <cms:editable name='text' label='text' type='text'/>


Any hints?
<cms:tile> supports only a limited subset of Couch tags as its children (namely - 'editable', 'repeatable', 'config_list_view', 'config_form_view', 'func', 'embed').

As you can see above, 'embed' is one so there should be no problem in using it within a tile.
As to then why it is not working? Well, please make sure you are on the latest version of Couch.
Then make sure 'var.html' is accessible - try placing <cms:embed 'var.html'/> in a test template directly (i.e. not within tile) and see it creates the regions.

Hope this helps.
Hi @kk,

putting the content of var.html into mosaic.html works like expected. path of var.html seems to be correct.

I inherited the project and it is based on CouchCMS Version 2.2.beta (20181125). Could this be the problem?
Quite possible as support for 'embed' was added later.
To confirm, please try finding the following (line 144) in couch/addons/mosaic/mosaic.php -
Code: Select all
if( in_array($child_name, array('editable', 'repeatable', 'config_list_view', 'config_form_view', 'func', 'embed')) ){ //supported tags

If 'embed' is not included there, you may need to upgrade.
@kk Thank you, that's it. Is it possible to update only the mosaic addon? My predecessor had patched some stuff and I don't have the time to check and validate all changes.
You may try modifying the line I mentioned to add 'embed' to it.
Hope it helps.
No, unfortunately not. But it's okay. The project is a little cluttered anyway and I have no time to dive into. Thank you for your help.
7 posts Page 1 of 1