So, I recently forced myself to get my head around Sage 9 on a new project, after hanging onto Sage 8 for ages, and overall now that I’m off to the races with it, I’m loving the improved data/template separation. In particular, I’m loving the Controllers implementation.
One question that I’ve got though: I’m making heavy use of the automated ACF variable passing via the controller to the view (this is really great) — but I’m not clear on how to access those same variables within the controller, without resorting to additional/redundant
I kinda thought that after including
protected $acf = true; in the controller, I’d be able to access ACF vars using the
$myvar syntax, as in the view, but this doesn’t seem to be the case? Since the ACF vars are already being loaded using the
protected $acf = true; directive, I’d like to be able to access them without having to make redundant
get_field() function calls, inside the controller, if possible.
Thoughts? Am I missing something here?