[RSS Feed/News] Ajax loaded template and formrows rendering

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Hello all! (y)

I have a question about ajax loaded content (template).

I use this code to get some ajax loaded content:
JavaScript:

Code:
    var ajaxParams = {'act': 'test'};
    XF.ajax('post', "{{ link_type('admin', 'canonical:myroute', null) }}", ajaxParams, function(data, textStatus, jqXHR){
        $('#mydiv').append(data.output);
    });
The php side has this:
PHP:

Code:
$this->setResponseType('json');
$html = \XF::app()->templater->renderTemplate('admin:sc_mytemplate', []);    
$output = ['output' =>...

Read more
Read more about this Feed . . .
 
Status
Not open for further replies.
Back
Top Bottom