Jump to content

Question about setting body and headline fields


PHPSpert
 Share

Recommended Posts

Hey guys, I've got a question about setting the body and headline field from the template. I've noticed when I set one of these fields and save the page, it doesn't actually save the value I set it to.

Here's the code I'm using to set a headline:

$website = $pages->get("user={$user}, path=/websites/");
$website->setOutputFormatting(false);

if(!$input->post->headline) {
$error .= "Please add your Headline.
";
} else {
$website->headine = $input->post->headline;
}

$website->save();

Is there something special I need to do to set this field?

Edited by adamkiss
Marked as solved
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...