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.

Widgets

Discuss SilverStripe Widgets.

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

How to get current page from widget


Reply

5 Posts   3551 Views

Avatar
dean_curly

28 March 2009 at 12:18am Community Member, 4 Posts

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

Avatar
dean_curly

28 March 2009 at 12:29am Community Member, 4 Posts

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

Avatar
dean_curly

28 March 2009 at 12:31am Community Member, 4 Posts

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

Avatar
g4b0

20 February 2013 at 3:27am Community Member, 6 Posts

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

Avatar
martindines

27 February 2013 at 5:22am Community Member, 1 Post

Director::get_current_page();