Jump to content

Help In Appcontroller.structure Event :)


PauloV

Recommended Posts

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...