This version takes into account that the old page must have the same locale as the new one As aSQLQuery is used, that doesn't autmatically respond to the locale_filter, the ModelAsController::find_old_page() function needed to be extended
Signature
public function find_old_page_localized(string
$URLSegment,
[integer
$parentID = 0,
[boolean
$ignoreNestedURLs = false]] )
Parameters
$URLSegment
—
string
A subset of the url. i.e in /home/contact/ home and contact are URLSegment.
$parentID
—
integer
The ID of the parent of the page the URLSegment belongs to.