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

    I´m creating a portfolio section and in my template i want to know if there exist a way to generate the optionS dynamically with Checkboxes TV .

    I´m using Wayfinder to generate the filter menu, and the GetResources to push the portfolio items.

    My tree structure is something like this:

    - Portfolio
    -- Interior Design
    -- Ambients
    -- Etc...

    My idea is push the subfolders pagetitle to create Checkboxes. When i create a portfolio subfolder with a category i want this checkbox area updated.

    Similar of this http://rtfm.modx.com/display/revolution20/Template+Variable+Input+Types#TemplateVariableInputTypes-MoreAdvancedUsage, but dynamic.

    Many thanks in advance and sorry about my english [ed. note: legues last edited this post 13 years, 10 months ago.]
      • 17249 ☆ A M B ☆
      • 165 Posts
      The example in the link will serve for your purposes because it is a dynamic call.
      Make a new template variable, don't forget to assign it to your template.

      Name
      portfolio

      Input Type
      Check Box

      Input Option Values
      @SELECT `pagetitle` FROM `modx_site_content` WHERE `parent` = 3

      where 3 is the ID of you portfolio resource container (the parent)

      Probably you want to output this values in the front-end separated by commas.
      If so, select...

      Output Type
      Delimiter

      Delimiter
      " , "(space, comma, space)

      Now you can create a post with your template, go to the Template Variables Tab and will see the dynamic check boxes working.
      then, place [[*portfolio]] somewhere in the content

      I recommend you to take a look to the Tag / Auto-Tag TVs as they probably fit better in your case.
      (later maybe you will want to link to each one of these categories, like tags in a post) [ed. note: lithiumlab last edited this post 13 years, 10 months ago.]
        • 16899
        • 284 Posts
        Muchas gracias!!!! Thanks a lot for all the explanation... I´ll test soon!!! smiley