Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-02-08 20:49:21

maartenD
Member
From: Warnsveld, The Netherlands
Registered: 2007-12-08
Posts: 47
Website

The <txp:else /> tag

Hi all,

Could anyone tell me why this peace of code works:

<txp:if_category name="afmelden">
   <p>This is category "afmelden"</p>
<txp:else />
    <p>This is another category</p>
</txp:if_category>

and why this code produce the error: Tag error: <txp:else /> -> Textpattern Warning: tag does not exist on line 1104

<txp:if_category name="afmelden">
  <txp:zem_contact to="blblba@blbblb.nl" label="" thanks="Uw afmelding is doorgegeven. Tevens is er een kopie van de afmelding  naar uw mailadres verstuurd." subject="Afmelden woensdagavond" copysender="1" label="Afmelden woensdagavond>
  <txp:zem_contact_text label="Naam" size="35" /><br />
  <txp:zem_contact_email size="35" /><br />
  <txp:zem_contact_select label="Soort wijziging" list=", Aanmelden als lid, Opgeven extra speelmoment, Beëindigen lidmaatschap" break="<br />" /><br />
  <txp:zem_contact_textarea label="Vul hier uw gegevens in" cols="35" rows="12" /><br /><br />
  <txp:zem_contact_submit label="Versturen" />
  <txp:zem_contact_serverinfo name="REMOTE_ADDR" label="IP-adres" />
  <txp:zem_contact_serverinfo name="HTTP_USER_AGENT"  label="Webbrowser" />
  </txp:zem_contact> 
<txp:else />
  <p>This is another category</p>
</txp:if_category>

When the page with the category “afmelden” is displayed it shows the contact form and below that the text “this is another category”. This isn’t what i expected.

I hope somebody can explain me what i am doing wrong.

I put this code in a form of type: misc.

Thx in advance.

Last edited by maartenD (2009-02-08 20:55:02)


Kind regards,

Maarten

Offline

#2 2009-02-08 21:07:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: The <txp:else /> tag

Missing quote at the end of the first line on the label attribute?

P.S. isn’t it break="br"?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2009-02-08 21:20:25

maartenD
Member
From: Warnsveld, The Netherlands
Registered: 2007-12-08
Posts: 47
Website

Re: The <txp:else /> tag

Bloke wrote:

Missing quote at the end of the first line on the label attribute?
P.S. isn’t it break="br"?

Bloke, thx!!! Indeed the missing quote was the problem. I also corrected the break attribute.


Kind regards,

Maarten

Offline

Board footer

Powered by FluxBB