$field->key()
Returns the name of the field.
-
return (string)
Example
<?php
echo $page->title()->key() . ': ' . $page->title()->html()
?>
This will return an output like this:
Title: Project A
Returns the name of the field.
<?php
echo $page->title()->key() . ': ' . $page->title()->html()
?>
This will return an output like this:
Title: Project A