[opencms-dev] Problem for create resource in workplace (I dont need login)
Nacho Fernández Orellana
nacho.fernandez.orellana at gmail.com
Wed May 6 18:27:43 CEST 2009
Hi Deiverson and list,
As far as I know, locking and publishing a file is always necessary when you
create a file, considering you need it available in the Online project. If
you only need it in the Offline project, there should be no need to do so.
Anyway, based on similar code as the one from the wiki, you could do the
following:
1.- Specify an action class for one of your modules that stores the
privileged CmsObject.
2.- Define in that class an static method called for instace
"writeFileInWorkspace" that, using the previously stored CmsObject creates
the file, lock and publish it.
3.- Call that method from anywhere in your site.
I have described this approach in http://www.opencms-wiki.org/Action_classes,
and though painful can be extremely reusable, write the code once and use it
in many places. I hope this gives you more information so you can decide
better what to do. Greetings,
Nacho Fernandez.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090506/455ae8a3/attachment.htm>
More information about the opencms-dev
mailing list