Jan Haderka wrote:
Ok, I'm continuing with this project. So, I'll have call the
setOnClick() method on my button to set an action and this is a
JavaScript call. I have dug into AdminCentral for a bit to see if I
could find anything that I could call to get the content in edit mode
activated/deactivated, but (I'm no JavaScript guru) that all seemed a
bit tied in with the AdminCentral tree interface.
If you want to execute specific activation workflow, you can have a look
at the http request produced by Configuration/Workflow when submitting
request to start the given workflow on given path.
If you want to call the activation command then the executing http
request like
http://localhost:8080/.magnolia/trees/website.html?treeAction=2&pathSelected=/your/path&comment=somecomment
should get you going (that's what the activation js in the tree does in
the end)
Ah, if something like that would work, then I could skip adding in our
own servlet.
I just activated a node through AdminCentral and Firebug tells me that
this was the resulting HTTP POST request
http://localhost:8080/magnoliaAuthor/.magnolia/trees/website.html:
----
browseMode false
forceReload true
mgnlCK 1260442391509
path /
pathSelected /demo-features
treeAction 2
treeMode snippet
----
I've found that treeAction 2 is 'activate' and treeAction 3 is
'deactivate' (which corresponds with the constants in
info.magnolia.cms.gui.control.Tree).
I'm not sure about the other parameters though. The pathSelected
parameter seems to be the content that will be activated/deactivated.
What is the comment parameter from your GET request for?
When doing this POST (or GET, following your example) via AJAX from the
main bar, what parameters would I need to pass exactly? I've tried
activating the demo-features site following your example, but that
doesn't actually activate the content:
----
$ curl
http://superuser:superu...@localhost:8085/magnoliaAuthor/.magnolia/trees/website.html?treeAction=2&pathSelected=/demo-features&comment=blablabla
----
Thanks for the help so far,
Nils Breunese.
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------