Jump to content

Workflow for saving/adding a file


Manaus
 Share

Recommended Posts

Hello, 

I'm trying to create a Page with a uploaded file.

What I'm wondering is Do I have to create the Page first, save, then add the file?

Or can I create the page, add the file then save?

Just to understand the Cms logic...

Thanks!!!

Link to comment
Share on other sites

I assume you are talking a front-end form using the API? You can make it transparent to the front end user. Have your form processing code save the page using whatever field you want for the title/name of the page, then $newpage->save(), then process the rest of the form fields including the file upload and then save again. Does that make sense?

  • Like 1
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...