MODX Cloud

The Most Productive MODX Learning Playground Ever

Claim Free Lab Account

(at)EVAL

Skip to end of metadata
Go to start of metadata

@EVAL Bindings

Syntax

@EVAL php_code

Evaluates a string of php codes and process the returned value from the code. Where php_code is the actual php code to be evaluated. The returned value can be either a string, array or a recordset.

@EVAL return "The time stamp is now ".time();

Using the @EVAL command you can write php codes to do almost anything possible with php scripts today. This is probably the most flexible and powerful of all the commands as it opens up TV bindings to virtually unlimited possibilities.

Nested Bindings

You can nest one @ binding inside another. For example, an @EVAL binding can be placed inside chunk while you can use the @CHUNK binding to retrieve the chunk containing @EVAL.

Labels

binding binding Delete
template-variable template-variable Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.