Jump to content


Photo

Question about setting body and headline fields

solved

  • Please log in to reply
2 replies to this topic

#1 ClintonSkakun

ClintonSkakun

    Jr. Member

  • Members
  • PipPip
  • 24 posts
  • 12

Posted 18 May 2012 - 11:38 AM

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, 21 May 2012 - 11:01 AM.
Marked as solved


#2 diogo

diogo

    Hero Member

  • Moderators
  • 2,008 posts
  • 1089

  • LocationPorto, Portugal

Posted 18 May 2012 - 12:58 PM

You have a typo
typo.png

#3 ClintonSkakun

ClintonSkakun

    Jr. Member

  • Members
  • PipPip
  • 24 posts
  • 12

Posted 18 May 2012 - 01:24 PM

You have a typo
typo.png

Opps:P

Thanks:)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users