Metadata in Entry.pm
Aug. 11th, 2012 05:55 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I'm trying to integrate setting a post as a sticky, and multiple stickies into the new entry form.
I've got the form set up to return whether the post should be a sticky and if so which sticky as a value for "sticky_select",
So in DW::Controller::Entry.pm in the function _decode, the value I want comes in as $post->{sticky_select}
That bit works fine.
But I then want to record the value in $req->{props} in order that it can be passed on to _do_post sensibly and the post set as the correct sticky at that point.
If I attempt to put in
or
or similar I get the error message
Client error: Unknown metadata: sticky_select
So my question is "How do I define metadata?" for use in this object.
I've got the form set up to return whether the post should be a sticky and if so which sticky as a value for "sticky_select",
So in DW::Controller::Entry.pm in the function _decode, the value I want comes in as $post->{sticky_select}
That bit works fine.
But I then want to record the value in $req->{props} in order that it can be passed on to _do_post sensibly and the post set as the correct sticky at that point.
If I attempt to put in
$props->{sticky_select} = $post->{sticky_select};
or
$props->{"sticky_select"} = $post->{sticky_select};
or similar I get the error message
Client error: Unknown metadata: sticky_select
So my question is "How do I define metadata?" for use in this object.