How to improve context scouting
|First read .
To do context scouting a footprint with data from the request of each page is stored under an unique id. Context scouting uses two parameters in the url or form to keep track of the context:
Technically the most reliable way to do context scouting is to allways include both parameters. However, to make transition from older versions easier, the pntScd parameter is often left out. To compensate each page class has a doScouting method that guesses the direction from the pntHandler parameter in the previous request. In specific applications you may have to override these methods or add pntScd parameters to urls and forms.
- pntRef refers to the id of the footprint of the previous page, i.e. the one that contains the url or form
- pntScd communicates the scouting direction. It can be d (down), u (up) and h (horizontal).
To debug the data that is collected by the scout, uncomment the lines at the bottom of PntSessionBasedScout::moved, the data will then be printed as comments at the top of each page.
- add <script> var pntFootprintId = 85; </script> to all your skinHeader.php files
- add &pntRef='. $this->getFootprintId() to buttons, especially those that use
. check implementors of getPageButtonScript
. check implementors of getMultiValuePropertyButtonScript
. check implementors of addMultiValuePropertyButtons
. check implemetors of getButtonsList
- add pntRef hidden field to forms
- check implementations of ObjectSaveAction::finishSuccess to include pntRef into the new request
- check context in selectionReport (first selection report is new context. This is
taken care of by PntObjectSelectionReport::doScouting. If you use other pages that
require a specific pntHandler request parameter value, you may want to override
isSameContextHandler to make these pages share their context)
- add &pntScd=d to menu's and all other places where you want to go into subcontexts (drill down)
- check Context buttons, SaveAction, DeleteAction etc where you want to
go back to context (move up)