Forum

Thread tagged as: Question

Empty paragraph tags

Hi,

Following is a snippet of a HTML template I'm using:

<perch:repeater id="introduction" label="Introductory Paragraphs">
<perch:if exists="intro"><p><perch:content id="intro" type="textarea" label="Introductory Paragraph" required="true" title="true" textile="true" /></p>
</perch:if>
</perch:repeater>

and the PHP:

div class="content">
<h2>Description</h2>
<?php perch_content('Description'); ?>

</div>

For some reason there is an empty paragraph element before and after when the <?php perch_content('Description'); ?> is injected.

I'm guessing the problem could be allowempty="true" being used on type="select" above or below a particular section of a template.

Is there any way to not have to select an item from a list?

Cheers

Garth Holmes

Garth Holmes 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Textile will automatically wrap its output in paragraph tags in most cases. So you don't need to extra paragraphs in your template.