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

XF 1.2 {$noH1} on forum_list

Discussion in 'Styling and Customization Questions' started by Marcus, Oct 17, 2013.

  1. Marcus

    Marcus Well-Known Member

    If I add this on forum_list, it does not work on PAGE_CONTAINER, even as forum_list is included before PAGE_CONTAINER checks for {$noH1}.
    PHP:
    <xen:set var="{$noH1}">1</xen:set>
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You can do it with CSS, unless you want to completely remove it.

    .forum_list .titleBar {
    display: none;
    }

    or

    .forum_list .titleBar h1 {
    font-size: 0px;
    }
     
  3. Marcus

    Marcus Well-Known Member

    Thanks! I had it done with CSS but I am wondering how I could remove it the most easy way. It's possible with a template=forum_list check on PAGE_CONTAINER, but I thought it is more efficient just doing it in forum_list.
     
  4. Daniel Hood

    Daniel Hood Well-Known Member

    Could you just remove it with a template modification? or are you wanting to only do it on certain pages?
     
  5. Marcus

    Marcus Well-Known Member

    I just want to disable it on forum_list
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    {$noH1} is a parameter which is set AFTER the PAGE_CONTAINER is rendered. It therefore cannot be overridden. And if it could, you would overwrite it using <xen:container (not <xen:set)

    {$noH1} is true if the <xen:h1> tag is defined but empty, e.g.

    <xen:h1></xen:h1>
    or
    <xen:h1 />

    If there is no <xen:h1> tag then it uses <xen:title>. If there is neither of those, then it uses the Board Title.

    The most efficient way is definitely a blank <xen:h1> tag and, that's basically how the Resource Manager does it in the Resource View.

    Yep. Change:

    Code:
    <xen:h1>{$xenOptions.boardTitle}</xen:h1>
    To:

    Code:
    <xen:h1></xen:h1>
    Or:

    Code:
    <xen:h1 />
     
    Last edited: Oct 17, 2013
    thedude and Marcus like this.
  7. Marcus

    Marcus Well-Known Member

    Amazing ! Thanks.
     
  8. Chris D

    Chris D XenForo Developer Staff Member

    Forgot one thing that XenForo does with the Resource Manager (in RM 1.0.x only of course).

    Using a template post render event and looking at the thread_view template, the H1 is removed as such:

    PHP:
    $containerData['h1'] = '';
    But I would consider the usage of that approach deprecated as a whole.
     
    Last edited: Oct 17, 2013
    Marcus likes this.

Share This Page