Hi!
how can print id page in my Page_Controller?
I create a funcion that retun $this->ID in my template but i see nothing..help please..
thanks!
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hi!
how can print id page in my Page_Controller?
I create a funcion that retun $this->ID in my template but i see nothing..help please..
thanks!
I'm not sure exactly what you are trying to do, but...
To print the current page ID in the template do this:
$ID
to access it in the controller or model of the page do:
$this->ID
or in a model or controller that isnt the page:
$this->CurrentPage()->ID