Hello folks,
is there way to find current page id in InitializeFrontend function?
I need for my MleCMS module and CmsNlsOperations::set_language_detector($obj) usage.
get_pageid_or_alias_from_url() is internal and private function, its use violates the rules, its use violates forge rules-
Thank you.
InitializeFrontend- get page id
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: InitializeFrontend- get page id
cms_utils::get_current_pageid();
cms_utils::get_current_content();
Though I don't know if that will work... because modules (those that aren't lazy loaded) are loaded before the url is parsed and before the e content object is loaded.
cms_utils::get_current_content();
Though I don't know if that will work... because modules (those that aren't lazy loaded) are loaded before the url is parsed and before the e content object is loaded.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: InitializeFrontend- get page id
Yeas, content object is loaded after this function and is unusable with/without lazyloading.
Thank you, I will try to find another way.
Thank you, I will try to find another way.
-
- Power Poster
- Posts: 751
- Joined: Fri Sep 12, 2008 2:34 pm
- Location: Schweiz / Switzerland
Re: InitializeFrontend- get page id
if you have a soluction, can you share it?kuzmany wrote:Yeas, content object is loaded after this function and is unusable with/without lazyloading.
Thank you, I will try to find another way.
Re: InitializeFrontend- get page id
InitializeFrontend not used in my solution. I will try to use some event.nockenfell wrote:if you have a soluction, can you share it?kuzmany wrote:Yeas, content object is loaded after this function and is unusable with/without lazyloading.
Thank you, I will try to find another way.
[Solved] Re: InitializeFrontend- get page id
My bad.
This works with disable LazyLoadFrontend in CMSMS 1.11.1
This works with disable LazyLoadFrontend in CMSMS 1.11.1