Closed jedateach closed 9 years ago
Or better yet - don't customise $this->owner
.
Hi @jedateach, I'd like the current page to be available in the BetterNavigator.ss template so that developers can override the template and have access to methods from the current page controller. It seems like an easy way to allow developers to customise the buttons on a per-page-type basis. So I'd prefer to go with your first suggestion unless there's another reason not to customise $this->owner
?
@jedateach did you have any additional thoughts on this?
I was recently working on a project that would break with better navigator because I had a
member
controller action. This is also a variable that the better navigator looks for in the global template variable space.Can I suggest that the data rendered here be wrapped inside another
ArrayData
variable likeBetterNavigatorData
? The template will need to be adjusted accordingly.This will ensure that BetterNavigator doesn't pick up controller/model functions/fields that users have defined.
I can't imagine this will break backwards compatibility because the
BetterNavigator
template is the one looking for these variables.