$page->decrement($field, $by = 1, $max = null)

Decrement a field value by one or a given value

  • since: Kirby 2.3.0
  • $field (string)
    A field name
  • $by (integer)
    An integer by which to increment
  • $min (integer)
    The min number
  • return ($page)

Example

<?php $page->decrement('likes') ?>

Is something missing or incorrect? Edit this page on Github…