Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » txp:comment?

#1 2006-03-22 00:12:33

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

txp:comment?

I’ve done some page titles using a nested if_section in an included Form. I’d like to give myself a reminder in that form of why I did this, such as “Txp doesn’t do nested if_section unless you include it through a form.” On the other hand, I don’t really want that message to be in the final HTML source of the page.

Should I do this using a PHP comment within txp:php tags, or is there such a thing as a “Textpattern comment”? I’m trying to avoid embedded PHP when possible, especially if Txp tags can do the job.

Offline

#2 2006-03-22 09:06:12

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: txp:comment?

There is no textpattern-comment, but it would be the simplest plugin to write (I mean, really, actually the simplest) by simply defining an empty function in a plugin like:

function abc_comment($attr, $thing) {}

and then use <txp:abc_comment>Check his out</txp:abc_comment> in your templates. You could even do the latter without defining the plugin function, though it would lead to warnings in testin/debugging mode.

Offline

#3 2006-03-22 18:30:36

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: txp:comment?

That might make a good first plugin for me. Thanks!

Offline

#4 2006-03-23 00:31:20

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: txp:comment?

This plugin already exists: anc_hide

Offline

#5 2006-03-23 19:10:49

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: txp:comment?

am I confused? why not use:

<!-- comment -->


Yes, I have tried turning it off and on.

Offline

#6 2006-03-23 20:02:00

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: txp:comment?

Because <!-- comment --> doesnt hide the HTML from the output.

The idea of the anc_hide plug-in is to not output the code wrapped by the plug-in tags.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#7 2006-03-24 04:41:06

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: txp:comment?

Mary wrote:

This plugin already exists: anc_hide

Thanks, Mary. I thought I checked the resources site, but I must’ve overlooked this somehow.

Offline

  1. Index
  2. » Archives
  3. » txp:comment?

Board footer

Powered by FluxBB