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

issue with changing title

Discussion in 'Styling and Customization Questions' started by typostudy, Apr 25, 2013.

  1. typostudy

    typostudy Member

    I am trying to change the title of this template: forum_list, in ACP->appearance->templates->forum_list, I saw this line:

    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:
    <div class="titleBar">
    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?
  2. Lycaon

    Lycaon Well-Known Member

    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.

    .titleBar h1 { 
    color: red;
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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

    	color: red;
    Lycaon likes this.
  4. typostudy

    typostudy Member

    Hi Jake,
    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
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  6. typostudy

    typostudy Member

    Thank. It is good to know there is only one container template: PAGE_CONTAINER.
  7. Uniphix

    Uniphix Active Member

    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.
  8. typostudy

    typostudy Member

    Good to know. Thanks. Uniphix.

Share This Page