how to make changes in template through my custom add on


i have created a add on to display views a resource has gotten its working but i have to put this code in template for views
<dl><dt>{xen:phrase views}:</dt> <dd>{xen:number $resource.viewcount}</dd></dl>

i want to use following code with my add on it is possible

<modification template="TEMPLATE_NAME" modification_key="ADDON_NAME" description="ADDON_
DESCRIPTION" execution_order="1" enabled="1" action="callback">


XenForo developer
Staff member
You should simply create the necessary template modification via the control panel. Associate it with your add-on and it will be exported with your XML.


after making changes i have assigned template resource_list_item or other templates to my add on but whenever i uninstall my add on make my resource page blank ..that's why i need to replace code of template rather then assigning it to add on ...please reply .


Well-known member
You don't reassign templates. What Mike said is correct. In debug mode you'll see a link in the left hand column under "Appearance" that says "Template Modifications."

Use that.


i have created for to templates forum_list and resource_list_item for my add on they are working...but change make for resource_index template through TMS not working for my addon...i can save the changes but cant see on my page ...