Hello,
I had to write small php script to add new document to modx database. Because it was to difficult to use modx/manager for some of my users.
My php function simply INSERT to database’s table new values (to table modx_site_content).
When I’m entering manager I can see new documents but on the website they don’t exists.
What should I do?
Did you set them to published & show in menu ?
AS test try turning caching off on some of those documents and saving them, MODx should go straight to the DB for them AFAIK
Use MODx, or the cat gets it!
The best bet is to use the DocAPI or similar for this, (please search in repository for them). They allow you much more control and let you handle the cache as well.
Typically you script should trigger the clear cache function of modx after creating the new docs.
I think it is going to be easier for you to use roles and permission + ManagerManager to make it easier for your
customers to create, edit and erase docs.
If you tie this with a modification of the main page of the manager, your users cannot cause a lot of harm to
the installation and you can make it as easy as a click in a link to create a new document.
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner
You might also take a look at the NewsPublisher snippet included in your install. It creates new documents in PHP code from user input but I suspect you could use some of its code.
Take a look, also, at the import html option in the Manager.