On 09/01/2011 11:08 PM, Kornel Lesiński wrote:
> On 1 wrz 2011, at 14:56, Tarjei Huse <tar...@scanmine.com> wrote:
>
>> Hi, I'm trying to include a JQuery template containing ${} into a PHPTal
>> template. Is there a way to say "do not use phptal within this block" or
>> just escape the $ signs?
>
> Yes, $${} will be printed as ${} in generated HTML.
>

Thanks, please consider the attached patch to the manual.

Regards,
Tarjei

-- 
Regards / Med vennlig hilsen
Tarjei Huse
Mobil: 920 63 413

Index: en/book.xml
===================================================================
--- en/book.xml	(revision 1033)
+++ en/book.xml	(working copy)
@@ -381,6 +381,29 @@
     template designers but must be read by <acronym>PHP</acronym> integrators as well.
     </para>
 
+    <section id="variableRefs">
+     <title>Referencing variables with ${}</title>
+     <para>
+     When working with templates and you want to reference a variable within the text, you can use the ${variableName} notation.
+     </para>
+      <para>
+      For example,
+      </para>
+     <informalexample><programlisting language="xml"><![CDATA[<span>You have ${count} credits left.</span>
+]]></programlisting></informalexample>
+
+     <para>You can also use the same PHPTALES paths as in other PHPTAL constructs:</para>
+     <informalexample><programlisting language="xml"><![CDATA[<span>Your best friend is: ${php: !some.other() ? "me" : "your dog"}</span>
+]]></programlisting></informalexample>
+     <tip>
+     <para>
+       If you have to exscape the ${var} notation, write $${var}.
+    </para></tip>
+
+
+
+    </section>
+
     <section id="attributes">
       <title>Attribute priority</title>
 
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to