Adding page owner programmatically

Permalink
Hi,

I want to add a page owner programmatically but I can't find any method in the page object to do that.

So my question is, how can I do that ?

 
Remo replied on at Permalink Best Answer Reply
Remo
It's part of the data array, just use the key "uID":

$data = array();
$data['cName']        = 'lovely new page';
$data['cDescription'] = 'very lovely new page';
$data['uID']         = 123;
$newPage = $parentPage->add($ct, $data);
nielsb85 replied on at Permalink Reply
Thanks Remo!
I totally missed that when I was searching for it:).

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.