Loading content from new table
Posted: Mon Dec 04, 2006 10:52 pm
I am trying to edit the cmsms code so that somebody can edit an existing page and save it unpublished for approval at a later date.
I have added a save button next to submit, apply and cancel in editcontent.php that when clicked stores the content in a new table called content_props_temp. If I click submit or apply the content is stored in the content_props table and the existing entry is overwritten. Basically, I have two tables, content_props that stores the content shown on the front end and content_props_temp that stores edited content before it is approved and published. So far, so good.
When somebody attempts to edit a page they should see the most recent version displaying unpublished edits and not the version that is being displayed on the front end. This is where I am having a problem. I can't seem to work out how to load the content from content_props_temp on the back end while keeping the content for the front end loading from content_props.
Can anyone help?
Thanks!
I have added a save button next to submit, apply and cancel in editcontent.php that when clicked stores the content in a new table called content_props_temp. If I click submit or apply the content is stored in the content_props table and the existing entry is overwritten. Basically, I have two tables, content_props that stores the content shown on the front end and content_props_temp that stores edited content before it is approved and published. So far, so good.
When somebody attempts to edit a page they should see the most recent version displaying unpublished edits and not the version that is being displayed on the front end. This is where I am having a problem. I can't seem to work out how to load the content from content_props_temp on the back end while keeping the content for the front end loading from content_props.
Can anyone help?
Thanks!