Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/18/2012 in all areas

  1. I've been working on making repeatable fields for ProcessWire for a couple weeks and actually now have it nearly ready. I need to do some more testing before releasing it, but wanted to give you a little preview. (please view the full screen version for better quality) Accessing repeatable fields from the API is super-easy. They are fully searchable/selectable with the API just as easily as with any other fields. So if you wanted to find all pages that had a buildings field with a floors value of 50 or more, you'd do this, for example: $pages->find("buildings.floors>=50"); Lets say you are on the page with a 'buildings' field and you want to print out all the building names and number of floors. It works exactly the same as page references: foreach($page->buildings as $p) { echo "<p>{$p->building_name}</p> has {$p->floors} floors.</p>"; }
    1 point
  2. Before we can repeat, we can slide! ProcessWire2+ RangeSlider Fieldtype This fieldtype let's you create slider input fields in the admin using the built in jQuery UI Slider. You can use it as a regular single value slider, or enable "Range" setting under details of the field edit screen, which gives you two number. In the front-end templates you can use the field as follows: If used as single value slider echo $page->fieldname If ranged slider is enabled echo $page->fieldname->min echo $page->fieldname->max Use in selectors strings With a regular single value slider $pages->find("range=120"); If range slider is enabled $pages->find("range.min>=100, range.max<120"); It comes with various settings. ------------------------------------------------------------------- - range enable - width of slider (%) - default value - min value - max value - step - prefix for displayed value(s) - suffix for displayed value(s) Download ------------------------------------------------------------------- You can download the Module from Github. https://github.com/s...nic/RangeSlider How to install ------------------------------------------------------------------- 1. Download and place the RangeSlider folder in: /site/modules/ 2. In the admin control panel, go to Modules. At the bottom/top of the screen, click the "Check for New Modules" button. 3. Now scroll to the RangeSlider Fieldtype module and click "Install". 4. Create a new Field with the new "RangeSlider" Fieldtype. Once saved you can configure the fieldtype, with various options under "Details" tab. I have made some testing, and installed on different PW installs. But if you find any issue, I'd like to hear. Have fun!
    1 point
  3. Support for stock levels added (with a shop wide setting to allow/disallow negative stock). Also now all settings do work (thanks to Ryan's fix on core).
    1 point
  4. Thank you, Ryan! Yes, russian symbols take more bytes, so it's good to have some spare ones. Just a thought. How cool it would be to see PW in Japanese or even Arabic. The last is RTL, so I guess it would take an extra effort to adapt user inerface to suit the text flow. And no, I don't know these languages Btw, I have to say I find the process of translation pretty enjoyable in PW. Before I always associated it more with digging in a dozen of php files, where all that little bits of output were hardcoded.
    1 point
×
×
  • Create New...