Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi,

why does this not work, when adding images?

Code: Select all
<?php require_once('couch/cms.php'); ?>

    <cms:template title="TEST" order='0' >
        <cms:mosaic name='content' label='Content'>
            <cms:tile name='ce_fotos' label='Photos' >
                <cms:repeatable name='ce_fotos' label='Photos' >
                    <cms:editable name='ce_foto' label='Photo' type='image' show_preview='1' preview_width='150' />
                </cms:repeatable >
            </cms:tile >
        </cms:mosaic >
    </cms:template >

    <cms:show_mosaic 'content'>
    <cms:dump />
    </cms:show_mosaic>

<?php COUCH::invoke(); ?>
@SimonWpt

Can you specify what do you exactly mean by:
why does this not work, when adding images?


If you mean that your code does not output anything when you <cms:dump />
Then please use the following code and see, I am sure this will work:
Code: Select all
<cms:show_mosaic 'content'>
        <cms:if k_tile_name='ce_fotos'>
            <cms:show_repeatable 'ce_fotos'>
                <cms:dump />
            </cms:show_repeatable>
        </cms:if>
</cms:show_mosaic>

Above code checks an <cms:if> for the k_tile_name and then outputs

OR
Code: Select all
<cms:show_mosaic 'content'>
            <cms:show_repeatable 'ce_fotos'>
                <cms:dump />
            </cms:show_repeatable>
</cms:show_mosaic>

Above code just outputs without any check


Well if this is what you meant by not working when adding images, then please take note. It will not work for any other editable region also. This is not because it is a bug or something. It is because, when you define a repeatable region, you cannot have the editable regions inside the repeatable region to output the data using a <cms:show ..... /> you will have to use <cms:show_repeatable '.....' >...</cms:show_repeatable>.

So for repeatable region to give output you will need to use <cms:show_repeatable '.....' >...</cms:show_repeatable> not just to show the output of the editable regions but also for <cms:dump /> and <cms:dump_all /> tags too.

If this is not the issue that you are facing, please provide more insight about your issue.

Regards,
GenXCoders
Image
where innovation meets technology
Hi GenXCoders,

the error in my original code (not posted) was the following the if clausle:

Code: Select all
<cms:if ce_headline>

instead of
Code: Select all
<cms:if k_tile_name='ce_headline'>


Thank you for your support. I understood my missunderstanding, when reading your code :)
@SimonWpt,
I am really happy to know that I could help.
Regards,
GenXCoders
Image
where innovation meets technology
4 posts Page 1 of 1