We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21419
    • 84 Posts
    I’m trying to figure out a way to hide empty template elements or variables from the output HTML.

    If I create a TV called [*SectionName*] to render the name of the section that contains a page and I set the template to render the TV as <h1>[*SectionName*]</h1>, how do I eliminate that <h1> block if I don’t put anything in the SectionName TV?

    I’m certain this is a fairly simple thing to do, but I’ve been going through different possible methods and solutions to the point I’ve utterly confused myself, so any help is greatly appreciated.
      • 5340
      • 1,624 Posts
      try this link

      PHx is required
        • 21419
        • 84 Posts
        FANTASTIC!

        I thought PHx was part of the solution, but it’s all new to me. Thanks a ton. Worked perfectly.
          • 21419
          • 84 Posts
          This is really great! I’ve already extended it to dynamically determine the layout of the page too so I can get my site back down to one template. Thanks again! Great tip!