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

    I know this may seem a bit counter intuitive, but is there a way of calling and displaying a tv variable such as [*id*] within another tv that I have assigned to a template?

    Only at the moment for the system to work properly, the client will have to enter the resource number manually into the new TV that I have created, and I can see this leading to all sorts of confusion!!

    Hopefully someone can understand my strange idea, and help!

    Thanks

    Hollie
      • 26016
      • 561 Posts
      Hi Hollie,
      I’ve thought of all kinds of things like that. We’re clearly both strange. smiley

      Client-proofing can be tough. Depending on what you’re doing, something like this may work... as you know, typing "[*id*]" is fairly obscure. Especially given that clients can often can’t type at all, or even necessarily think. smiley

      How about using a TV dropdown? Then you can label the values in a human-readable manner. For "Input Type" choose Dropdown List Menu". For "Input Option Values", you’d have this type of thing: (for the last one, I point to a specific document)

      Here==[*id*]||Parent==[*parent*]||Special==[~43~]
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 12294
        • 30 Posts
        That’s worked brilliantly!

        Thanks Samba - it’s good to know I’m not the only one thinking about these thing! grin

        Thanks

        Hollie
          • 26016
          • 561 Posts
          Hollie,
          Excellent! My clients ask me all kinds of crazed stuff, and MODx is so flexible, I can usually do it.

          Here’s another helpful thing - say you have a client who isn’t updating pages much, but might want to stick "this week’s deals" in a box, and have it automagically on every page of their site. You give them one page, and tell them just to edit that (mark it not to display in the menu). Then you make note of the document number, and create a TV. You use a special value in the "Default" part:

          @DOCUMENT 43


          The 43 would be changed to match your document number. Then assign that TV to every template, (and stick the bit of code for that TV in each template), and that beauty will appear on every page.

          If you’re using Evo, you can even get more specifically nuts with TV’s using PHx, and with Revo, the Output Filters are even better than that, I think. But with regular TV’s, I can pretty much get whatever I want, usually.

          Cheers, Dave
            MODx and Wordpress development
            Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4