how to make changes in template through my custom add on

#1
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 ...how it is possible

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

Mike

XenForo developer
Staff member
#2
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.
 
#4
after making changes i have assigned template resource_list_item or other templates to my add on but whenever i uninstall my add on ....it make my resource page blank ..that's why i need to replace code of template rather then assigning it to add on ...please reply .
 

Jeremy

Well-known member
#5
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.
 
#6
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 ...
 
Top