Notifications Module and eventparams
Posted: Mon Sep 16, 2013 4:15 pm
Hi
I am trying to set email notification using "Notifications Module 1.0"
- Module seems to be working fine but the use of "eventparams" is not clear to me. So - maybe someone with better experience can push me to right direction.
So - I am trying to set very basic notification that fires when user has done content editing and edited content is placed in email note. I am then using Event "Core.ContentEditPost"
- and my code (in Notification Modules html -mail) is:
"{$eventparams.content->content_en}"
.. that gives error "PHP Notice: Undefined property: Content::$content_en in.."
**********
I tried to find the right parameters with UTD "error_log(print_r($params, true));"
- and I get this:
*****************
Array
(
[content] => Content Object
(
[_contentBlocks:protected] => Array
(
[content_en] => Array
(
[type] => text
[id] => content_en
[name] => content_en
[usewysiwyg] => true
[oneline] => false
[default] =>
[label] =>
[size] => 50
[tab] =>
[maxlength] => 255
)
)
[_contentBlocksLoaded:protected] => 1
[doAutoAliasIfEnabled:protected] => 1
[stylesheet:protected] =>
[mId:protected] => 37
[mName:protected] => Pages and navigation
[mType:protected] => content
[mOwner:protected] => 1
[_props:protected] => Array
(
[pagedata] =>
[searchable] => 1
[disable_wysiwyg] => 0
[content_en] => <p>Pages determine the structure of your web-site as seen in the admin Content ยป Pages page. Think of a web-site as a set of pages. These pages are accessed through a menu. You can also link to a page from within another page</p> ...
*****************
But what ever I try to use as parameter - no results..
- How should I write my code?
Thank You
CMS 1.11.8
PHP 5.4.4
MySQL 5.5.25
Apache 2.2.22
I am trying to set email notification using "Notifications Module 1.0"
- Module seems to be working fine but the use of "eventparams" is not clear to me. So - maybe someone with better experience can push me to right direction.
So - I am trying to set very basic notification that fires when user has done content editing and edited content is placed in email note. I am then using Event "Core.ContentEditPost"
- and my code (in Notification Modules html -mail) is:
"{$eventparams.content->content_en}"
.. that gives error "PHP Notice: Undefined property: Content::$content_en in.."
**********
I tried to find the right parameters with UTD "error_log(print_r($params, true));"
- and I get this:
*****************
Array
(
[content] => Content Object
(
[_contentBlocks:protected] => Array
(
[content_en] => Array
(
[type] => text
[id] => content_en
[name] => content_en
[usewysiwyg] => true
[oneline] => false
[default] =>
[label] =>
[size] => 50
[tab] =>
[maxlength] => 255
)
)
[_contentBlocksLoaded:protected] => 1
[doAutoAliasIfEnabled:protected] => 1
[stylesheet:protected] =>
[mId:protected] => 37
[mName:protected] => Pages and navigation
[mType:protected] => content
[mOwner:protected] => 1
[_props:protected] => Array
(
[pagedata] =>
[searchable] => 1
[disable_wysiwyg] => 0
[content_en] => <p>Pages determine the structure of your web-site as seen in the admin Content ยป Pages page. Think of a web-site as a set of pages. These pages are accessed through a menu. You can also link to a page from within another page</p> ...
*****************
But what ever I try to use as parameter - no results..
- How should I write my code?
Thank You
CMS 1.11.8
PHP 5.4.4
MySQL 5.5.25
Apache 2.2.22