Marcus
Well-known member
PHP:
<a href="{xen:link invoice/test}" class="Loader"
data-target="#myContainer">Click me...</a>
<div id="myContainer">123456</div>
Once clicking on it, it should display "Hello World". Instead XenForo.Loader is executed and the link is "unlinked" as it should, JSON returns
PHP:
{"templateHtml":"Hello World","css":"","js":"","_visitor_conversationsUnread":"0","_visitor_alertsUnread":"0"}
PHP:
public function actionTest()
{
return $this->responseView(
'XenForo_ViewPublic_Index',
'shop_test',
array()
);
}
Template shop_test:
PHP:
Hello World
index.php?invoice/test works great by showing "Hello World". "data-method='replaceAll'" makes the #myContainer disappear, also the unlinking works. So the target is handled, it's just that the template is not rendered there. Do you have any clue what is going wrong? Thanks.
This is Kier's Post for using XenForo.Loader:
....
Last edited: