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: Problem

Template region dissapearing in admin on save

I have an issue with a repeater region template. I want to reuse the entered content entered in the form in the admin area for a link and image link. It does output what is needed based on the ID but on save the form disappears from the admin...

<table class="inventoryList">
    <tbody>
        <perch:repeater id="products" label="Product Row">
            <tr>
                <td>
                    <center><a href="<perch:content id="itemNumber" label="Item Number">"> <img src="/masonry/resources/<perch:content id="itemNumber">-thumb@2x.jpg"></a></center>
                    <center><p class="listItemNumber"><perch:content type="text" id="itemNumber"></p></center>
                    <center><p class="newItem"><perch:content type="text" id="newItem" label="New Item Date"></p></center>
                </td>
                <td>
                    <perch:content type="textarea" editor="ckeditor" id="description" label="Description" html>
                </td>
                <td>
                    <div class="price">
                        <p style="text-align: center;">$ <perch:content type="text" id="price" label="Price"></p>
                    </div>
                </td>
            </tr>
        </perch:repeater>
    </tbody>
</table>
Jonathan Hazelwood

Jonathan Hazelwood 0 points

  • 4 months ago

I found the issue, it had to do with some custom javascript.

Drew McLellan

Drew McLellan 2638 points
Perch Support

You shouldn't ever have your entire template in a repeater. I think you need a multiple item region instead.

Drew McLellan

Thanks I did update the template to be a multiple item region instead which is way better to manage the data. See below for the updated code that I implemented.

<perch:before>
<table class="inventoryList">
    <tbody>
</perch:before>
<tr>
                <td>
                    <center><a href="?s=<perch:content id="itemNumber" title="true" label="Item Number">"> <img src="<perch:content id="productImage">"></a></center>
                    <center><p class="listItemNumber"><perch:content type="text" id="itemNumber"></p></center>
                    <center><p class="newItem"><perch:if exists="newItem">New <perch:content type="text" id="newItem"></perch:if></p></center>
                    <center><p class="reducedTo"><perch:if exists="reducedTo">Reduced to $<perch:content type="text" id="reducedTo"></perch:if></p></center>
                </td>
                <td>
                    <perch:content type="text" id="productShortDescription" label="Description" html>
                </td>
                <td>
                    <div class="price">
                        <p style="text-align: center;">$ <perch:content id="price"></p>
                    </div>
                </td>
            </tr>
<perch:after>
</tbody>
</table>
</perch:after>