We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10357
    • 573 Posts
    Hi,

    i would like to be able to create one tv and then use it multiple times, a bit like using classes in CSS.


    cheers,
    G
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Ok, just put it wherever you want it... [*myTV*] ...as many times as you like. And you can either leave it alone, or edit its value for every page.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 10357
        • 573 Posts
        hi,

        yes, but if i change [*myTV*] in one place it will also change all other instances. What i want, it to be able to assign the characteristics of a tv to multiple places without having to create a TV for each place.

        e.g i want a page with 3 percentage bars built off the value of a TV. To do this i would normally create 3 separate TVs, one for each bar. This soon gets tedious if i want 10,20,100 bars etc. I want to be able to create just one TV as the parameters are the same for every bar.

          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: g5604 at Nov 30, 2006, 11:28 AM

          hi,

          yes, but if i change [*myTV*] in one place it will also change all other instances. What i want, it to be able to assign the characteristics of a tv to multiple places without having to create a TV for each place.

          e.g i want a page with 3 percentage bars built off the value of a TV. To do this i would normally create 3 separate TVs, one for each bar. This soon gets tedious if i want 10,20,100 bars etc. I want to be able to create just one TV as the parameters are the same for every bar.
          That’s called a snippet. Simply put a call to a snippet that handles getting the individual instance values to each TV, as the content for the TV.
            • 10357
            • 573 Posts
            thanks, i will digg out my php book grin