Hi all,
I've got a class inherited from PRPage with some additional
properties, and I want to hide those properties from all but the page
owner at edit time. The problem is that PREditCommand doesn't pass the
context to the page before requesting its description, so the page
instance doesn't have the necessary information to dynamically change
its description.
I can get the required functionality to work, by overriding
PREditCommand>>description to make decisions about how to render the
page, but that seems I wonder if there's a better way to approach
this? In other words, is there a sensible way to make PRPage aware of
the context in which its edit form is being rendered? I was
contemplating adding context as an instance variable on PRPage and
setting it from PREditCommand, but I suspect that if that was a
sensible approach, it would have been done already!
I've only just started using Pier in earnest, so if this question
exposes a lack of understanding of anything fundamental, please feel
free to point this out.
Cheers,
Michael