Refresh sub navigation after save
I have created an edit page for a Resource that should only show based on a field value. I am using the canAccess static method to check the value in the record and it works great, if the value is not valid and you try to access the page you get a 403 error and the sub-navigation item is added/removed accordingly but I need to manually refresh the page to actually see the change in the sub-navigation.
Is there a way to force the sub-navigation to refresh after the form is saved to automatically add or remove the link to the page?
Solution:Jump to solution
Ok so the solution I've found for now is to overwrite the getRedirectUrl() method on the Edit class:
```
protected function getRedirectUrl(): ?string
{...
1 Reply
Solution
Ok so the solution I've found for now is to overwrite the getRedirectUrl() method on the Edit class:
I just redirect to the same page the form I need to check is and it just works.