We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11076
    • 159 Posts
    It’s Really the simplest snippet, but this comes in handy from time to time (That’s Until we’ll have a normal Slidebar,(#2) , input for modx).
    <?php
    /*  GenerateNumList Snippet
     *  ----------------------
     *  USEAGE: (e.g):
     *  Use with TV on Creation/Edit
     *  Input Type: `DropDown List Menu`.
     *  Input Option Values:
     *  @EVAL return $modx->runSnippet('GenerateNumList', array('i' => 200, 'n' => 500, 's' => ' px'));
     */
    
    // Default values:
     $n = isset($n) ? (integer) $n : 600; // Limit
     $p = isset($s) ? $s : ' px';         // Label suffix
     $output = '';
    
    // Generate:
     for ($i = isset($i) ? (integer) $i : 1; $i < $n; $i++) { $output .= $i .$s.'==' .$i .'||';}
     $output .= $i .$s.'==' .$i;
     return $output;
    

    Description:
    Generates numerical (decimal) values list with label suffix for using with input option values on drop down menus.
      Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
      • 9995
      • 1,613 Posts
      i was looking for a slider like this for some product search, it has to do a search say 1 till 100 and u can choose 1 slide 30 and 1 slide 60 so it searches for 30 - 60 when submitting.
        Evolution user, I like the back-end speed and simplicity smiley
        • 11076
        • 159 Posts
        If you have some Ext JS knowledge you can try to figure out how to implant it(=sliderbar) as an input type for modx, if you do manage to do so, i suppose i’m not the only one who will be more than glad to have it, if you wouldn’t mind to share.

        I think this would help:
        http://rtfm.modx.com/display/revolution20/Adding+a+Custom+TV+Input+Type
          Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
          • 9995
          • 1,613 Posts
          no knowledge smiley else offcourse i would share.
            Evolution user, I like the back-end speed and simplicity smiley
            • 11076
            • 159 Posts
              Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...