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