Question on menu

hi kirby-forum,

quick question on the menu in the starterkit.
unfortunately i am fairly unexperienced regarding php so i was wondering what the “r” in this line does?

  • (in the cookbook it is e($item->isOpen() instead)

    thanks in advance

  • r()only returns the value, e() echoes it.


    <?= r($item->isOpen(), ' is-active') ?>

    (here we echo the return value of r($item->isOpen(), ' is-active'))

    is the same as

    <?php e($item->isOpen(), ' is-active') ?>
    1 Like

    thanks you for the quick reply. understand this now.