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

question about the container

#1
Code:
<xen:container var="$head.canonical"><link rel="canonical" href="{xen:link 'canonical:index'}" /></xen:container>
Above code is taken from: acp->appearance->templates->forum_list.
Questions:
1. how could I know what is the container of forum_list?
2. xen:link, where can I see the syntax of xen:link? I can see xen:container here: http://xenforo.com/community/threads/xenforo-template-syntax.23245/, but can not find xen:link
3. what is canonical?
 
#3
Thanks James.
Questions:
1. I check acp->appearance->templates->PAGE_CONTAINER, I did not see forum_list, so how did the template forum_list work inside PAGE_CONTAINER?
2. for this code,
Code:
<xen:container var="$head.canonical"><link rel="canonical" href="{xen:link 'canonical:index'}" /></xen:container>
how could i see the output in frontend or html source code? will it generate something like:
Code:
<a href="canonical:index" >...</a>
 

James

Well-known member
#4
Thanks James.
Questions:
1. I check acp->appearance->templates->PAGE_CONTAINER, I did not see forum_list, so how did the template forum_list work inside PAGE_CONTAINER?
2. for this code,
Code:
<xen:container var="$head.canonical"><link rel="canonical" href="{xen:link 'canonical:index'}" /></xen:container>
how could i see the output in frontend or html source code? will it generate something like:
Code:
<a href="canonical:index" >...</a>
The "canonical:" prefix before the index tells XenForo to load the canonical URL - it isn't actually part of the URL.

As for the forum_list, you can't find it in PAGE_CONTAINER because it's loaded directly from the PHP code, in XenForo_ControllerPublic_Index. What are you trying to do?
 
#5
Thanks for your explanation.
I am trying to understand how the template works and how it affects all the site. I just take forum_list as an example, I am trying to understand the codes in forum_list, and change it a little bit, see how does it work. I am going to change the layout and make templates for my site, but before it, I need to figure out how template system work in XerForo, especially I need to understand the codes with xen syntax. so if you have any documentation or resource to suggest, I will appreciate it.