• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How do I pass a param in xen:callback

AndyB

Well-known member
#3
Hi xf_phantom,

Thank you so much for your link. I've been looking at that and trying to make it work, but no success.

What I would like to do is pass the thread_id to my php script.

I was hoping something like this would work:

<xen:callback class="Andy_CalendarAdded_index" method="getHtml" params="{$thread}"></xen:callback>

my php script looks like this:

PHP:
<?php
class Andy_CalendarAdded {
    public static function getHtml($content, $params) {
        echo $params;
    }
}
?>
 

AndyB

Well-known member
#5
Yes here's the code I added to my thread_view template:

<xen:callback class="Andy_CalendarAdded_index" method="getHtml" params="{xen:array 'thread={$thread}'}"></xen:callback>