wilsea Posted July 11, 2014 Posted July 11, 2014 I'm trying to update a number of pages with the following code $levels = $pages->find("template=level"); echo "Changing ". count($levels). " levels"; foreach($levels as $lev){ $lev->setOutputFormatting(false); $lev->user_id = 4233; $lev->save; } The message shows the correct number of levels, so the code is being run, but the pages are not changed. It's probably something trivial, but I can't figure our what I'm missing. Can someone put me on the right track?
wilsea Posted July 11, 2014 Author Posted July 11, 2014 Thanks arjen - can't believe how long I looked at the code without noticing the missing () . Knew it had to be something obvious but still couldn't see it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now