Dadparvar
Well-known member
I used "params="{$xenOptions.dadparvar_newsticker_char_limit}" in callback and "$charlimit = func_get_arg(1);" in my php file.Yes, you can, just pass the parameter using the "params":
Code:<xen:callback class="Example_Banner_Index" method="printSomethingBold" params="Hello World!"></xen:callback>
Then in the code, you can get the parameter (there is another ways):
Code:<?php class Example_Banner_Index { public static function printSomethingBold() { $phrase = func_get_arg(1); return '<b>' . $phrase . '</b>'; } }
Also, you can pass an array using this:
Code:params="{xen:array 'thread={$thread}'}"
Then used "$charlimit" where i Needed. And worked as it must. Thanks.
But how to pass more params to php file and get and use it php file in different places?