Presenter: added isModuleCurrent() [Closes #240]#243
Presenter: added isModuleCurrent() [Closes #240]#243dg merged 1 commit intonette:masterfrom khorsky:is-module-current
Conversation
|
Thanks. What do you think about change name to |
|
In template I would read Your proposal makes sense too (line of code saying "is this presenter in the module XY"). Despite that I do not "like it". When trying to find a better name I refused
I would stick to It's similar in name and similar in usage. The most beneficial use case is probably to mark navigation item as active/current. I tried to use "isInModule" in the template with this use case - it looks strange... |
|
Ok :-) |
new feature
@dg has already added
$presenter->getModule()method, which is universal. I've added an alternative to$presenter->isLinkCurrent()for modules.doc PR: nette/docs#??? I'd send PR if accepted. I've checked current doc and send small PR (Create link target for Latte documentation, fix incomatibility with Latte description docs#790). I would propose to describe new behavior in same section.