Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

Widgets /

Discuss SilverStripe Widgets.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to get current page from widget


Go to End


5 Posts   7191 Views

Avatar
dean_curly

Community Member, 4 Posts

28 March 2009 at 12:18am

Hello! Is there any way to access the page the widget being rendered on from widget itself?

Avatar
dean_curly

Community Member, 4 Posts

28 March 2009 at 12:29am

Ok, I see: Diector::getCurentPage();

Avatar
dean_curly

Community Member, 4 Posts

28 March 2009 at 12:31am

Sorry, right method is Director::currentPage();

Avatar
g4b0

Community Member, 14 Posts

20 February 2013 at 3:27am

It doesn't work anymore with SS 3.1. How can I do it now?

Avatar
martindines

Community Member, 1 Post

27 February 2013 at 5:22am

Director::get_current_page();