SecureTemplates are a family of protected frame and button templates defined as part of FrameXML. Through attribute-based configuration, they allow addons to access some of the protected functionality. The templates are defined in FrameXML/SecureTemplates.xml, and functionality supporting them resides in FrameXML/SecureTemplates.lua

Template Widget Type Function
SecureActionButtonTemplate Button Perform protected actions.
SecureUnitButtonTemplate Button Unit frames.
SecureGroupHeaderTemplate Frame Managing group members.
SecurePartyHeaderTemplate Frame Managing party members.
SecureRaidGroupHeaderTemplate Frame Managing raid group members.
SecureGroupPetHeaderTemplate Frame Managing group pets.
SecurePartyPetHeaderTemplate Frame Managing party pets.
SecureRaidPetHeaderTemplate Frame Managing raid group pets.

An example Edit

Suppose we wanted to create a button that, when clicked, would cast Thorns on the player. This can be solved by inheriting from SecureActionButtonTemplate and setting the relevant attributes. For example, using only XML:

 <Button name="MyThornsButton" inherits="SecureActionButtonTemplate" parent="UIParent">
   <Attribute name="type" type="string" value="spell"/>
   <Attribute name="spell" type="string" value="Thorns"/>
   <Attribute name="unit" type="string" value="player"/>
  <Size x="64" y="64"/>
Layer definitions are only valid on pages of namespace "Layer"
  <Anchors><Anchor point="CENTER" /></Anchors>

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.