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

Lack of Interest Please use default XenForo title container in resource discussion

Discussion in 'Resource Manager Closed Suggestions' started by CyberAP, Apr 9, 2013.

  1. CyberAP

    CyberAP Well-Known Member

    I am struggling with resource manager in order to make it look better in one of my styles.
    I don't really know why but RM discussion view disables $h1 by default and uses a hook (probably) to display the resource title. If we look deeper in the code the resource title doesn't much differ from XenForo default $h1. Even more if we add a .titleBar class to the .resourceInfo block there will be no change - that's because the code is the same.


    But instead of using native $h1 container RM uses it's own hook and disables $h1. Some styles have customized $h1 (for example placing it above breadcrumbs).
    I tried to include the resource header in $h1 with this code (inside of thread_view template):

    <xen:if is="{$thread.discussion_type} == 'resource'"><xen:include template="resource_view_header" /></xen:if>
    But it does place the header insider the hook that RM uses (after breadcrumb).

    I also tried to place the code in PAGE_CONTAINER but got no luck since the $thread variable is not accesible there and I can't make a proper IF statement. The code there should be:

    <xen:if is="
        {$controllerName} == 'XenForo_ControllerPublic_Thread' &&
        {$thread.discussion_type} == 'resource'">
            <xen:include template="resource_view_header" />
    I sincerely ask you to use the default $h1 container (or at least a 'page_container_content_title_bar' hook) for the resrouce discussion title and customizing RM won't be such a pain as it is now. Thank you!
  2. Mike

    Mike XenForo Developer Staff Member

    The <h1> itself is the same, but it's everything surrounding the h1 which isn't necessarily the same. Though I think we could probably pull it off with some modifications.

    However, as it stands, this was done intentionally so it's not a bug - it's how the system dictates this sort of thing. It'd probably change with a RM release after/for XF 1.2.
    Andrej and CyberAP like this.
  3. CyberAP

    CyberAP Well-Known Member

    That would be great. Thanks!
  4. CyberAP

    CyberAP Well-Known Member

    Unfortunately this hasn't changed in RM 1.0.1. RM still uses <xen:title> in resource discussion view instead if <xen:h1>.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    As per Mike's comment above, the RM hasn't yet been updated after 1.2.
  6. CyberAP

    CyberAP Well-Known Member

    I just thought 1.0.1 could make it. Plus if someone else having this styling issue it's good to share the knowledge.
  7. CyberAP

    CyberAP Well-Known Member

    RM is updated for 1.2. Things are, unfortunately, the same. :(
  8. Mike

    Mike XenForo Developer Staff Member

    I don't actually remember what I was even thinking of doing TBH...

    Though strictly speaking, the RM has been updated "to be compatible" with 1.2 - it hasn't had a full, 1.2-only update yet.
    CyberAP likes this.
  9. CyberAP

    CyberAP Well-Known Member

    Hope this gets changed in next version, I've been waiting quite a long for that :)
    intradox likes this.
  10. CyberAP

    CyberAP Well-Known Member

    I've probably been bugging you for quite a bit, but this issue still occurs in 1.1.2.
    One thing I noticed that you have now 2 separate templates for header and for tabs. That's good, but I can't find a use for that since it's thread view that dictates how to handle heading and RM passes it's header through a hook, as it is since 1.0.0. Any chance that would change and we'll have header served in a usual <xen:h1> tag instead? :)
    Last edited: Mar 15, 2014

Share This Page