Hi Leo,
Add a repository property under the command content node and set its value to
website. The activation command expects to receive a repository as a parameter.
So you need it twice: once as the workspace being listened to and second as the
workspace content is activated from.
activateContent
+ listener
+ command
- class:
info.magnolia.module.admininterface.commands.ActivationCommand
- repository: website
Also, just to verify: are you sure the Observation module is installed? The
/modules/observation folder can be present with some sample listeners inside it
even if the Observation module is not installed. Some modules bootstrap their
own listener configurations. A quick way to check is Magnolia Store > Installed
modules. Also, you should have a version node under /modules/observation. The
reason I'm asking is that the Observation module bootstraps a listener called
activateAddedPages that does exactly what you are trying to do. So you wouldn't
need to create your own.
--Antti
On Jul 1, 2011, at 10:22 AM, Leo Lozes wrote:
> Hi everyone,
>
> I’m trying to automatically activate content of a website.
>
> I know this has been discussed a lot of times, and I’ve read a few posts and
> documentation, but I must be missing something, or I just didn’t understand
> how the whole thing works J
> I’m just trying to figure out how the observation module is working, and I’ve
> tried this configuration in our test environment:
>
> activateContent
> +listener
> +command
> -class:
> info.magnolia.module.admininterface.commands.ActivationCommand
> -class:
> info.magnolia.module.observation.commands.RestrictToNodeTypeEventListener
> -nodeType: mgnl:content
> -active: true
> -eventTypes: NODE_ADDED
> -includeSubNodes: true
> -path: /demo-project/about/
> -repository: website
>
> Should I do my own implementation of Activation Command? (I read the mail of
> Ernst Bunders)
> Or I just completely misunderstood the whole thing? J
>
> Gracias y saludos desde Mallorca!
>
> Leo
>
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------