In a panel field it’s possible to do this:
$blueprint = $this->page()->blueprint()->yaml();
foreach( $blueprint['fields'] as $key => $item ) {
print_r($item);
}
The problem is that it does not take into account that there may be global field definitions.
This is kind of the result I’m looking for:
I want it to include the global field definitions as well.
$blueprint = $this->page()->blueprint()->yaml();
foreach( $blueprint['fields'] as $key => $item ) {
if( ! empty( $item['type'] ) && $item['type'] == 'text' ) {
echo $item['value'];
}
}