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

RM 1.0 How to style RM discussion view

Discussion in 'Resource Manager Support' started by CyberAP, Mar 29, 2013.

  1. CyberAP

    CyberAP Well-Known Member

    I noticed RM uses thread_view for the connected discussion. The question is how to style it and not affect the original template?
    Default elements position is not suitable for me and I want to move tabs to another place plus make resource info as $h1. I suppose the code is injected in hooks but I can't change their position within thread_view template because that will cause inconsistency. How should I customize this page then?
  2. CyberAP

    CyberAP Well-Known Member

    Bump here. Please can developers just give a hint on how to style resource discussion view? I can't customize HTML there because RM and XF share the same template. Is there any kind of a solution of that problem?
    What I am trying to do is to place the resource header inside the $h1 property (but it doesn't work somehow) and the resource navigation into upper pageNavLinkGroup.

    Other resource pages don't have this issue so far.
    Andrej likes this.
  3. Mike

    Mike XenForo Developer Staff Member

    {$thread.discussion_type} is different for resources, so you can adjust what you do based on that.
    Andrej and CyberAP like this.
  4. CyberAP

    CyberAP Well-Known Member

    Unfortunately $thread variable is not accessible within PAGE_CONAINTER template. Is there any way to determine that I am in a resource discussion within PAGE_CONTAINER?

    I want to completely replace $h1 block in a resource discussion.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Can't you pass the variable to the PAGE_CONTAINER template using xen:container ?
    CyberAP likes this.
  6. CyberAP

    CyberAP Well-Known Member

    I thought template container (in our case PAGE_CONTAINER) renders earlier than the content template.
  7. CyberAP

    CyberAP Well-Known Member

    Maybe I'm not getting the idea, but I've created empty variable in PAGE_CONTANER, then in the template that can access $thread variable I used xen:container to pass $thread.discussion_type. Then again in PAGE_CONTAINER I dumped my new variable and got nothing.

    So the code is:


    <xen:set var="$RMhead"></xen:set>
    {xen:helper dump, $RMhead}
    In resource_view_header

    <xen:container var="$RMhead">{$thread.discussion_type}</xen:container>
  8. CyberAP

    CyberAP Well-Known Member

    Figured it out. I should've set my variable inside resource_view_header rather than PAGE_CONTAINER.
    It's working now!
  9. CyberAP

    CyberAP Well-Known Member

    Though I can now change titleBar depending on content template, titleBar is still not working. Data from resource itself is not passed. I just get this:


    Looks like I have no choice but wait for RM for 1.2.

Share This Page