Skip to content

Kirby 3.6.6

$field->length()

Returns the length of the field content

$field->length()

Example

<?= $page->text()->kirbytext() ?>

<dl class="text-stats">

  <dt>Characters</dt>
  <dd><?= $page->text()->length() ?></dd>

  <dt>Words</dt>
  <dd><?= $page->text()->words() ?></dd>

</dl>