Page::getText($string[,$default=true])

Version 4

Text constructed by row field values

Return the title text constructed by field information.

Return value

String

Arguments

$string
String to be parsed and replaced with page values.
As in parseText()
$default
Value to return if $string is empty
Default: return row title.

Full documentation

Show order number and client name of all pages in Pages -object.

foreach ( $Orders as $Order ){
    $txt .= "<h2>{$Order->getText('number client.name')}</h2>";
}

Use braces with complex content:

foreach ( $Orders as $Order ){
    $txt .= "<p>{$Order->getText('<h2>{number} {client.name}</h2><p>{description}</p>')}</p>";
}