1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to getting template name?

Discussion in 'XenForo Development Discussions' started by lsxforo, Mar 28, 2016.

  1. lsxforo

    lsxforo Member

    I have a question too.

    Is there way to get an own template name(unique) that inside certain template?
  2. wang

    wang Well-Known Member

    Yes, you can include your own template inside another template with this code:

    <xen:include template="templateName" />
    lsxforo likes this.
  3. lsxforo

    lsxforo Member

    Love it. @wang
    But the mean of mine is quite different. ;)
    It assumed that I didn't know the template name though I did know it.
    The way to aware the name of itself.

    Instead of
    <xen:include template="otherTemplateName" />
    As routeMatch, if there is like a templateMatch or other function, it would be to know self name. I looked at the helper items but can't found any clues.

    Too wrong?
    Last edited: Mar 28, 2016

Share This Page