Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

Refresh an asset with AJAX

CsabbencsCsabbencs
edited December 2011 in Development

Besides sending DeliveryType DELIVERY_TYPE_ASSET in values when posting with ajax what should I do in order to be able to refresh the content of a specific asset?

First example (question): first line of dashboard/views/setting/index.php is

$this->RenderAsset('Messages');

So, how can I refresh the asset 'Messages' without refreshing the view 'index'?

Second example (question): the asset container 'Panel' is usually full of modules. How can I refresh the content of a specific one?

Comments

  • ToddTodd Chief Product Officer Vanilla Staff

    We don't currently have a way to pick individual assets or modules in a standardized way.

    To grab a module you can usually go through the module controller. So as an example you could do the following:

    $('.BoxCategories').get(gdn.url('/module/categoriesmodule?DeliveryType=VIEW'));
    

    The message module is a bit tougher since I think it needs to know the page context to know what messages to render. This would be a good extension to program.

Sign In or Register to comment.