Unwanted semicolon appearing

Pawtucket 2.0

As I understand it, the following should produce no results on the web page unless there is content in the description field. When there is none, the description header and a semi-colon always appear anyway. See oval highlighted area in attached image.

            {{{<ifdef code="ca_objects.description">

               <div class='unit'><h6>Description</h6>

                  <span class="trimText">^ca_objects.description</span>

               </div>

            </ifdef>}}}

Can someone point out my error?

Thanks,

Mark

1900 x 1279 - 516K

Comments

  • You may have multiple values in that field with spaces.

  • Thanks for the responsiveness, Seth. The field is blank in the database, and on the data entry form. I can't see where it would be getting anything. Also, I am getting the same problem with dates, which do have multiple entries. See attached image.

                {{{<ifdef code="ca_objects.unitdate" delimiter="<br/>"><H6>Date</H6><unit relativeTo="ca_objects"><l>^ca_objects.unitdate.date_value</l><br/></unit></ifdef>}}}

    1903 x 1536 - 525K
  • Hi,

    Check something: when you edit this object, do you have multiple "description" fields with the same locale (English, for example)? (Even if these "description" fields are empty)

    If yes: try to remove these "description" fields (by clicking the ⊗, save, empty the cache directory, and try again.

  • Thanks for your response, Darrigan. No. There is one description field only. There is a secondary Note field for conservation comments, but the description field is the only one that has rich text formatting. I have this same semi-colon problem with the date fields, as shown in the image above. I have tried so many things, and still that semi-colon just won't go away.

  • Solved it. The semi-colon was being produced by this code:

                {{{<ifdef code="ca_objects.description">

                   <div class='unit'><h6>Description</h6>

                      ^ca_objects.description

                   </div>

    However, the semi-colon was a result of the Source line being empty. We will not need that function so I deleted the Source line and the semi-colon went away.

    Mark

Sign In or Register to comment.