No way to access FrontendPage->_page
A suggestion for 2.2, submitted by alpacaaa on 10 December 2010
Announcement
Symphony's issue tracker has been moved to Github.
Issues are displayed here for reference only and cannot be created or edited.
Browse
Closed#434: No way to access FrontendPage->_page
How about Frontend::instance()->Page
?
Heh, documentation for the win. That said, I was under the impression that it was exposed through $context['page']
.
I’d have to check to be certain though.
edit Yeah true, there really isn’t a way to get that information from that variable. A call to getCurrentPage()
would probably return the same result as there is no processing done on $_page
there is no processing done on $_page
FrontendPrePageResolve
let you change $_page hence this request. Just want to see 2.2 as bulletproof as possible ;)
Without wanting to sound objectionable, if you can already modify this via a delegate, why is there a need for a public method to modify it as well?
Sorry Nick, haven’t noticed that one.
The point is, you shouldn’t be able only to change it, but to get the modified value later too. It could turn handy when working with url router, for example.
I know this may sound a bit stupid, but what I’m asking for is a simple accessor method. With documentation making its way, I think this is a great time to address these little oddities/inconcistencies.
Added FrontendPage->Page()
in this commit
Thanks Brendo :)
This issue is closed.
This is really minor, but it would be useful having a method to get the $_page attribute of class
FrontendPage
.