I'm working on a widget that will display members viewing a Page node. Unlike forums and categories a Page node does not set the context option in the widget, so I use
Then I decided to use a route filter (for testing). Since the filter removes the
Thanks for any guidance/suggestions.
\XF::app()->request()->getRequestUri();
to look for /pages/
and then I pull the node name out to match it in the session activity table.Then I decided to use a route filter (for testing). Since the filter removes the
/pages/
part, there is no way to test to see if the URI is for a Page node or not. So I added \XF::app()->router('public')->getRouteFiltersIn()
to grab the route filters. I'll need to loop through those to find a match in the replace_route
key, to load in the find_route
key value to test it to see if it is a page route or not. Before I do, is there a function that does this already? (Or is there a better way?) I've checked and could not find one.Thanks for any guidance/suggestions.