Kornel Lesiński <kor...@...> writes:

> On 06-08-2009 at 18:48:46 Richard Cernava <cern...@...> wrote:
> >   I'm at a loss to find a method to disable PHPTAL parsing for a block of
> > XML/HTML. I am aware that there placing anything in a comment removes it  
> > exempts
> > it from being parsed, but I have not found another method.
> >
> > What I'm wanting to do is as follows:
> >
> > <div tal:no-parse="true">
> > ${abc}
> > </div>
> >
> > Am I totally missing this?
> I'm not sure what exactly do you want.
> If you want to output ${abc} literally on the page, then write $${abc}.  
> There's no attribute for this.
> If you want to hide content of an element, then <div tal:replace=""> will  
> work (and if you wrap content in <![CDATA[ ]]>, you won't need to worry  
> about closing tags, etc. inside the element).

My apologies for not being more specific. I don't think parse was the proper
word to use, but more interpreting. I have a java script TAL library that I
would like to pass TAL marked up HTML with out it being interpreted and
converted to PHP. Thus the reasoning behind disabling interpreting on a block of
HTML/XML and just passing it through. CDATA isn't what I'm looking for. I
suppose I could go with another name space rather than TAL, maybe? Presently my
work around is to use conditional comments that I strip off in the comment
switch in the XML parser.

An example would be:

<span tal:content="string:I'm PHP"/>
<div tal:interpret="false">
  <span tal:content="string:I'm javascript"/>

phptal's out put would be:
<span>I'm PHP</span>
  <span tal:content="string:I'm javascript"/>

PHPTAL mailing list

Reply via email to