So I'm trying to use setName as a way to change the name of about 1000 child pages because I need it to be different. I wrote the code an it works because it is changing the URL but not the "name" of the page. What am I doing wrong?
<?php
foreach($page->children() as $child){
$sku = str_replace(' ', '-', strtolower($child->upc));
$page->setName($sku);
}
?>
What am I doing wrong? the UPC changes. but the page name does not.
Thanks