It seems relatively easy to do within the main XenForo library, but how can I add a template tag with an addon? For example the usage in a template would be similar to other tags:
I didn't have much luck with extending the template compiler (my only guess), and not sure how else to approach this, or would it not be possible currently?
Edit:
Okay this works: http://xenforo.com/community/threads/extending-the-core-library.14297/#post-189255
Although this would require usage like:
But I would prefer to have it as:
Is creating a custom tag that way possible?
Also just found someone with the same question.
http://xenforo.com/community/threads/adding-my-own-custom-xen-tag.21299/
Code:
<xen:customtag attr="$var" />
Edit:
Okay this works: http://xenforo.com/community/threads/extending-the-core-library.14297/#post-189255
Although this would require usage like:
Code:
{xen:helper myhelper, $var, true}
Code:
<xen:mytag something="$var" />
Also just found someone with the same question.
http://xenforo.com/community/threads/adding-my-own-custom-xen-tag.21299/