We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28033
    • 925 Posts
    I know template variables can be done by specific templates, but can this also work on specific sections?

    I run a website for an RPG series, and for instance, if I made a section for a specific boss in the game, I might want to include certain items / spells / whatever to use to beat said boss (which would be inserted via the "TV as Chunks" script on the ModX Wiki).

    Now, since this series has 20+ games, and each one has different items / skills (text varies, or items vary from one game to another), this would make a huge list of TV’s to choose from for every page (which might not even use them), and I’d assume that would increase the loading time of the page as well (when editing).

    I don’t want to do a different template for each page/section that would need it, since I plan to implement a template-switcher to allow the user to pick which version of our site’s layouts they want to use, hence why a way to do it by sections (i.e., Game1 has access to the game1 TV, but Game2 could not access it) would be *really* helpful.

    Any help is appreciated. smiley
      My Snippets
      -> PopUpChunk v1.0
      • 8960
      • 150 Posts
      Would the code Hald pasted here help you?

      You might have to read a couple of posts before that to see what we were talking about, but it kinda sounds like what you need.
        • 28033
        • 925 Posts
        Quote from: er16004 at Mar 21, 2007, 12:39 PM

        Would the code Hald pasted here help you?

        You might have to read a couple of posts before that to see what we were talking about, but it kinda sounds like what you need.

        Wouldn’t that require having {{contentnamehere}} for each and every one (so if I had...let’s say 20 items I needed to list, I would need 20 of those?)?

        I was hoping for more of a thing that allowed me to pick and choose like a normal TV, since I might want to use it elsewhere on that game’s section (plus it would make things easier for a new staff member who is "learning the ropes").

        ---------------------

        I noticed this snippet. Would this work (it’s a tad bit too techy in it’s description, so I dunno if it’ll work or not for me)?
          My Snippets
          -> PopUpChunk v1.0
          • 8960
          • 150 Posts
          I was going to suggest a way to use the code from my link in TVs w/multiple select, but I like what you found as well. I’m going to have to give both a good try (since I need the same function you originally stated).
            • 28033
            • 925 Posts
            Quote from: er16004 at Mar 21, 2007, 01:33 PM

            I was going to suggest a way to use the code from my link in TVs w/multiple select, but I like what you found as well. I’m going to have to give both a good try (since I need the same function you originally stated).

            If you happen to find which one works better before I do (since I have other things I’m working on ATM --- moving content from another CMS to ModX), please let me know. smiley
              My Snippets
              -> PopUpChunk v1.0