Blesta Addons Posted September 14, 2014 Report Posted September 14, 2014 Please note that the AppController.structure event has been updated to use arrays instead of strings for head, body_start, body_end in 3.3.0-b2. This is a backwards incompatible change (with 3.3.0-b1). Please be prepared to update your plugins if your plugins use the AppController.structure event. See CORE-1421 for more info. Hello Cody , the array can support identification array for exmaple $return_val = $event->getReturnVal(); $return_val['body_start']['plugin_name'] = "<p>stuff</p>"; $event->setReturnVal($return_val); with this we can control the output , and we can override another plugin output if we need . or unset it totally . this is possible ? Quote
Cody Posted September 15, 2014 Report Posted September 15, 2014 i need this to override some varaible in the body , or to set other that are not set in some pages . also i need it to run my own function in the header , i use it for seo analisys ( the preaction event is not given me some info i need , like the title page and some other vars . You wouldn't be able to overwrite any variables with a function. With this event you can set other variables in structure, but again, only in structure and you can't overwrite variables that are set in structure after the event is called. You can set whatever variables you like, however. You are not limited to header, body_start, and body_end. Not sure what you're trying to do for seo analysis, but it's trivial to set javascript in body_end, for example google analytics. Quote
Cody Posted September 15, 2014 Report Posted September 15, 2014 Hello Cody , the array can support identification array for exmaple $return_val = $event->getReturnVal(); $return_val['body_start']['plugin_name'] = "<p>stuff</p>"; $event->setReturnVal($return_val); with this we can control the output , and we can override another plugin output if we need . or unset it totally . this is possible ? You could do it, if you wanted to so you could manage these values across your various plugins, but there is no requirement to define values that way. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.