Tuesday 17 February 2004 6:11:40 am
Assuming you've created the article ok and now you're trying to 'edit' the values - The object has been created, but has not been assigned a node id yet. You need to do 4 things:
1) Validate See design/standard/content/edit_validation.tpl a simple include for this file should do the trick.
2) Edit your content
Normally you'd use attribute_edit_gui, but for this you'll probably need to do it by going through and inputing yourself like so: <input class="hidden" name="$object.contentobject_attributes.0.data_text}" value="$postvariable" /> This input will work for the title of an article because .0. tells you the position of the attribute in the array and data_text tells the input where to put the data (which variable) You may be able to put the POST variable straight into the value, but I'm not sure. You'll need to do {$object.contentobject_attributes|attribute(show)} to find out what the variable names are for other attributes of your object. It might help to have a 'dummy' data item to look at with this function, so you can see where the data needs to be entered.
3) Set the placement See standard/templates/content/edit_placement.tpl, again a simple include should suffice, but you'll want to cut some of the stuff that displays on the page out.
4) Set the MainNodeID
Copy and paste this to your input <input type="hidden" name="MainNodeID" value="{$main_node_id}" /> Hope this helps and I haven't gone backwards! Regards, James
|