Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-06-23 15:45:58

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

comment my code in templates & forms

Is there a way to comment your code in Txp page templates and forms without the comments being processed?

I could <code><!— comment like this —></code> but comments that are specific to Txp they won’t make sense in the HTML source, and there could be so much of it I’d rather not bloat the page with it.

I’m jumping through so many hoops at the moment it would be nice to be able to come back and make sense of it all!

Offline

#2 2006-06-23 15:52:42

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

Re: comment my code in templates & forms

hi pieman

Check the txp:anc_hide plug-in


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2006-06-23 15:57:43

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: comment my code in templates & forms

bada bing!
you just added hours/days/months to my life :)

Offline

#4 2006-06-23 21:25:14

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,393
Website GitHub Mastodon

Re: comment my code in templates & forms

You could also enclose the hidden part with any conditional tag that is never true, for instance:

<txp:if_section name="not-there">
[... hidden content ... ]
</txp:if_section>

where not-there is (of course) a section that does not exist on your site.

Last edited by wet (2006-06-23 21:25:46)

Offline

Board footer

Powered by FluxBB