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

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

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.

sc.webp

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):

Code:
<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:

Code:
<xen:if is="
    {$controllerName} == 'XenForo_ControllerPublic_Thread' &&
    {$thread.discussion_type} == 'resource'">
        <xen:include template="resource_view_header" />
</xen:if>

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!
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
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.
 
Unfortunately this hasn't changed in RM 1.0.1. RM still uses <xen:title> in resource discussion view instead if <xen:h1>.
 
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.
 
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:
Top Bottom