Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#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
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
Re: txp:comment?
am I confused? why not use:
<!-- comment -->
Yes, I have tried turning it off and on.
Offline
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.
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
Pages: 1