I would like to request a new feature for Sage Directives that enables direct access to ACF fields related to a specific post using a custom Blade directive.
Currently, to fetch and display an ACF field related to a specific post, one needs to use the get_field function within PHP blocks. For example:
$customerName = get_field('projectKeyfacts', $project->ID)['projectCustomer']->post_title;
Given that $project already returns the post object, it would be beneficialto have a dedicated directive to simplify this process.
@directive('fieldName', 'fieldKey', $post->ID)
If there are any considerations or alternative methods for achieving this functionality, I am open to suggestions. Thank you for considering this feature request.
I would like to request a new feature for Sage Directives that enables direct access to ACF fields related to a specific post using a custom Blade directive.
Currently, to fetch and display an ACF field related to a specific post, one needs to use the get_field function within PHP blocks. For example:
$customerName = get_field('projectKeyfacts', $project->ID)['projectCustomer']->post_title;
Given that
$project
already returns the post object, it would be beneficialto have a dedicated directive to simplify this process.@directive('fieldName', 'fieldKey', $post->ID)
If there are any considerations or alternative methods for achieving this functionality, I am open to suggestions. Thank you for considering this feature request.