We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Blog

Select image by checkbox

Hi, I want to select ogimage from a blog's post repeater. I am using a checkbox so I can call it later.

<perch:repeater id="images" label="Images">
        <perch:before><ul></perch:before>
            <li>
                <div>
                    <img src='<perch:blog id="imageAlbum" type="image" label="image" width="800" help="Recorta a 800px de ancho" />'  />
                       <perch:blog id="caption" type="textarea" editor="markitup" textile="true" size="xs" label="Caption" />
                       <perch:blog id="seleccionada" type="checkbox" label="Choose as ogimage?" value="1" suppress="true" />
                </div>
            </li>
        <perch:after></ul></perch:after>
    </perch:repeater>

Here is my blog custom code

    $ogimage = perch_blog_custom(array( 
        'template' => 'imagenfb.html',
        'filter' => array(
            array(
            'filter' => 'postSlug',
            'match' => 'eq',
            'value' => perch_get('s'),
            ),
            array(
            'filter' => 'seleccionada',
            'match' => 'eq',
            'value' => 1,
            ),
        )));

and my template

<perch:blog id="imageAlbum" type="image" label="image" width="800" help="Recorta a 800px de ancho" />

But it doesn't get anything... any idea?

Raul Serrano

Raul Serrano 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You need to use:

'filter' => 'images.seleccionada'