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

issue with changing title

#1
I am trying to change the title of this template: forum_list, in ACP->appearance->templates->forum_list, I saw this line:
<xen:h1>{$xenOptions.boardTitle}</xen:h1>

1. I changed {$xenOptions.boardTitle} to mysite, and it works. But I think this is not good way to change it. So how could I change the value of this variable:$xenOptions.boardTitle]? I thought the value of $xenOptions.boardTitle is taken from this table: xf_option, but actually in this table, only 3 fields are set, option_id:boardTitle, can_backup :1, addon_id:XenForo, so it seems the value of this variable:$xenOptions.boardTitle is not stored in database.



2. for <xen:h1></xen:h1>,
a. I changed it to <xen:h2></xen:h2>, and it shows "Template syntax error.". So which html tag I can use in XenForo?
b. I changed it to <h3>{$xenOptions.boardTitle}</h3>, and in front page, it shows two "XenForo", one is in <h1>, one is in <h3>, source code:
Code:
<div class="titleBar">
<h1>XenForo</h1>
</div>
<h3>XenForo</h3>
so how does this happen?
c. if I want to add some css in<xen:h1></xen:h1>, eg. I want to change the color of title, using h1{font-color:red}, how could I do this?
 

Lycaon

Well-known member
#2
The title is stored in the database as a BLOB.

If you want to change the board title across the whole forum then just edit it in the ACP, if you want it to be different in certain places then you'd need to edit the templates and change $xenOptions.boardTitle to whatever you wish.

For the font color, I think adding this to EXTRA.css would work.

Code:
.titleBar h1 { 
color: red;
}
 

Jake Bunce

XenForo moderator
Staff member
#3
Admin CP -> Home -> Options -> Basic Board Information -> Board Title

xen:h1 is a special template function which passes the value to the container where the h1 tag is used. There is no xen:h2 function.

Where exactly do you want the h2 to appear in the page source?

To change the color of the h1 with CSS, edit this template:

Admin CP -> Appearance -> Templates -> EXTRA.css

Code:
.titleBar
{
	color: red;
}
 
#4
Hi Jake,
xen:h1 is a special template function which passes the value to the container where the h1 tag is used. There is no xen:h2 function.
Question:
1. where can I see all the available template functions such as xen:h1?
2. what is the meaning of container? it seems that there are 2 concepts in XenForo, container and template, could you give me a brief explanation or give me some articles that I can read? thanks
 

Uniphix

Active member
#7
Actually you can make as many container templates as you want, you can even change the container template for the entire environment without messing up the default PAGE_CONTAINER.