We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17959 ☆ A M B ☆
    • 57 Posts
    Magnatron [Maarten Wolzak] Reply #1, 13 years ago
    Hi,
    I wonder if it is possible to have an Auto-Tag template variable show only the tags that are used within the current context?

    Case: Magazine publisher.
    - Every magazine has it's own context.
    - An Article-resource has a TV 'Category' which is an Auto-Tag.
    - Every magazine has it's own named categories.

    How can MODx only show the appropriate categories for the current magazine (context)?

    Maybe a plugin which acts onTVPreFormRender?

    All pointers are very welcome.

    Thanks
      • 3749
      • 24,544 Posts
      I think you could do it with a Form Customization rule setting visible with a constraint of context_key='contextName'.

      Another way to do it would be to use different, but identical templates for the different contexts and just connect the TVs to the appropriate template.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 17959 ☆ A M B ☆
        • 57 Posts
        Magnatron [Maarten Wolzak] Reply #3, 13 years ago
        Thanks BobRay,

        I'm not quite getting the hang of the form customization yet... (there's not a lot of documentation on it either)
        Will try some more.

        Different templates will be my last resource. We're creating a platform for a lot of magazines/contexts, I do not want to create different templates for every magazine unless it's unavoidable.
          • 3749
          • 24,544 Posts
          I find Form Customization confusing too. wink

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting