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

XF 1.2 So how does the TM work?

Discussion in 'Styling and Customization Questions' started by Code Monkey, Jul 24, 2013.

  1. Code Monkey

    Code Monkey Well-Known Member

    I added a simple template modification that I am using on my 1.1.5 site with TMS to the 1.2 Template modifier and it doesn't work. It says compilation error. Yet when I hit the test button it shows it as working.

    Any ideas?
     
    Last edited: Jul 25, 2013
  2. Mike

    Mike XenForo Developer Staff Member

    What's the modification?
     
  3. Code Monkey

    Code Monkey Well-Known Member

    Nothing. It's my own template edit to change the footer. I made a fake mod and added it to that to see if mod is required but it still doesn't work.
     
  4. Code Monkey

    Code Monkey Well-Known Member

    Footer

    Find
    Code:
    </div>
    </xen:hook>
    Replace
    Code:
    <div id="footBlock">
        <div class="pageWidth">
            <div class="pageContent">
                <span class="helper"><xen:if is="@xeno_fluid"><xen:include template="xeno_fluid_text_resizer" /></xen:if> </span>
            </div>
        </div>
    </div>
    
    </div>
    </xen:hook>
     
  5. Code Monkey

    Code Monkey Well-Known Member

    error

    Code:
    footer    Master Style    Compiler error (may be from another template modification)    -
    footer    XenoMorph Framework    Compiler error (may be from another template modification) 
    It's not actually showing an error for the xenfracture template I am using. Those two above are not selectable so I figured that may be why for them.
     
  6. Code Monkey

    Code Monkey Well-Known Member

    I also checked to see if the actual template was checked to disallow modifications and it's not. I then checked if it's modified and it shows my modification.
     
  7. Mike

    Mike XenForo Developer Staff Member

    The "xeno_fluid" property won't exist in the master, so your if tag will be invalid -- the same thing would happen if you tried to edit the master template manually. You could do "{xen:property xeno_fluid}" explicitly, though you're still making a modification that depends entirely on a single style.

    Given what you're doing, you should just make a child style of the XenoMorph framework and use the merging tools to bring in updates when necessary.
     
  8. Code Monkey

    Code Monkey Well-Known Member

    I am trying to edit the child of the xenomorph framework. It doesn't show up in the error list but it doesn't display either. Why is there no style specific choice for this anyway?
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    Think of the TM System as more of a developer's tool for creating add-ons.

    This is relevant:

     
  10. Code Monkey

    Code Monkey Well-Known Member

    You lost me Chris. Are you saying edit the template directly? That just makes for an upgrade nightmare. Unless I'm missing something here.
     
  11. Mike

    Mike XenForo Developer Staff Member

    Yes, he is. And it's nowhere near the headache it was now that there's a 3 way merging system. Merging should be more accurate and less error prone than template modifications as well.
     
    BamaStangGuy, Dan and Chris D like this.
  12. Code Monkey

    Code Monkey Well-Known Member

    I took this bit out and it works so that code must have changed.

    Code:
    <span class="helper"><xen:if is="@xeno_fluid"><xen:include template="xeno_fluid_text_resizer" /></xen:if> </span>
     
  13. John

    John Well-Known Member

    Where did you see that code? In the framework or xenFracture? I have eliminated the fluid text feature from the framework in 1.2 (it was never fully implemented) and thought I got rid of all references to it in the templates.
     
  14. Code Monkey

    Code Monkey Well-Known Member

    That was in my old one. I'm trying to move to 1.2. I realized now that you took that out so it was invalidating.
     
  15. John

    John Well-Known Member

    Ahh, okay. Have you downloaded the 1.2 versions from me yet?
     
  16. Code Monkey

    Code Monkey Well-Known Member

    yeah. I was trying to do a template replacement in the new version that I did in the old and thus the error. All fixed now that I realize you changed some stuff. I'm a little slow right now with a muscle torn in my shoulder. Pain is clogging my brain. lol
     
  17. Chris D

    Chris D XenForo Developer Staff Member

    @Mike

    This is just a thought... Is the 3 way merging system worth an additional HYS with an emphasis on getting people into the mentality that template edits are no longer taboo?

    I know you're busy enough but it could be useful :)
     
  18. John

    John Well-Known Member

    Better living through chemicals...that's all I'll say :p (seriously, tho, get feeling better soon!)
     
  19. Jeremy

    Jeremy XenForo Moderator Staff Member

    I think it was pretty well covered in the HYS its already mentioned in.
     
  20. Chris D

    Chris D XenForo Developer Staff Member

    I agree.

    But no one seems to understand its significance. Too many people still find editing templates to be something they shouldn't do, and think they need the TM system for it.
     
    John and Bob like this.

Share This Page