flexy:nameuses="variable" (Previous) (Next) HTML_Template_IT

View this page in Last updated: Sun, 24 Aug 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

<FLEXY:TOJAVASCRIPT JSVAR="PHPVAR"> ...

<FLEXY:TOJAVASCRIPT JSVAR="PHPVAR"> ... -- Provides a simple way to pass data from PHP to Javascript

Description

To reduce the "WTF" effect of magically having javascript code that looks like flexy tags completely broken by the template engine, Flexy deliberately turns the parser OFF when dealing with script contents (see Configuration Options for details of PHP in script tags)

As a result of this, it is not possible to put any flexy tags within blocks of javascript code. the flexy:tojavascript tag solves this in a way that enables javascript to be tested seperatly from the application, and also serves to encourage better coding practices. (eg. seperating your code with distinct lines of communication)

This feature depends on PEAR's HTML_Javascript Library

Example

flexy:nameuses="variable" (Previous) (Next) HTML_Template_IT

Download Documentation Last updated: Sun, 24 Aug 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: nomatter@php.org
Are you people serious? This is one of the worst pieces of documentation I've seen, to date.

What are the attributes for this flexy tag? How do you populate a javascript variable with a PHP one? What scope issues exist?

Can somebody elaborate how this actually works? The examples given are useless.