Get the actual page where module is slided

Hi,

Is there a way to get the page where a module has been insert with the page builder?

Thanks,

Jean-David Rivard

Hey Jean-David,

Sorry, not really getting what you’re trying to do. Could you elaborate a bit?

Ben

For sure. I have a custom module. I want this module link with the page where it is drag. With a fl_builder_control, I can determine a unique ID for the instance of the module. So, I want to know if I can get the current ID Page from a custom fl_builder_control action?
By example, in my register_module settings, I can add a custom fl_builder_control to save the ID of the page with a hidden input settings.
Another way to link my ID with the page, it is to get the current ID of the page within my custom module Frontend.php.
So, is there a way to get the current page ID either in custom fl_builder_control or in frontend.php file?

Thanks,

Jean-David

Hi Jean-David,

You should be able to access the current page ID like this…

global $post;

$id = $post->ID;

Let me know if you have any questions about that.

Justin

Oh yeah! I was a bit confusing and I forgot this simple way.

Thanks a lot!

Jean-David