Jump to content

Recommended Posts

Posted

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!!!

Posted

If you would try it would give you an error saying that you have to first save the page, I think.

Posted

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

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
  • Recently Browsing   0 members

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