About Dimension Fieldtype
Field that stores 3 integer values for width/height/depth.
Category 1 | Field Types Fieldtype modules that represent a data type used by fields. |
---|---|
Category 2 | Input Fields Inputfield modules that provide a UI input widget in the ProcessWire admin. |
Release State | Beta Close to stable, but users are advised to be cautious and test thoroughly.* |
Author | |
Module Version | 1.0.3 |
Class Name | FieldtypeDimension |
Compatibility | 2.1, 2.2, 2.3, 2.4 |
Date Added | July 18, 2013 |
Recommended By | New recommendations may take up to 1 day to appear. |
Instructions
This module's files should be placed in /site/modules/FieldtypeDimension/
How to install or uninstall modules
README
Dimension Fieldtype
What it does
This fieldtype let's you define 3 dimensions width / height / depth as integer.
Output the values in templates
There's a property for each dimension
echo $page->fieldname->width;
echo $page->fieldname->height;
echo $page->fieldname->depth;
There's also support for a computed value of the volume. WHD. This will get stored additionally to the database and updated every time a dimension value changed. So it can also be used in selectors for querying.
echo $page->fieldname->volume;
Use in selectors strings
The dimensions can be used in selectors like:
$pages->find("dimension.width=120");
or
$pages->find("dimension.height>=100, dimension.depth<120");
or
$pages->find("dimension.volume>=1000");
Field Settings
- There's field settings for the width of the inputs in pixels.
- There's a input setting to add a suffix string to each input like "mm" or whatever you like.
How to install
-
Download and place the module folder named "FieldtypeDimensions" in: /site/modules/
-
In the admin control panel, go to Modules. At the bottom of the screen, click the "Check for New Modules" button.
-
Now scroll to the FieldtypeDimension module and click "Install". The required InputfieldDimension will get installed automatic.
-
Create a new Field with the new "Dimension" Fieldtype.
Support thread
- Admin Helpers
- Authentication
- Core Modules
- Development Tools
- Email/WireMail
- Field Types
- Import/Export
- Input Fields
- Language Modules
- Language Packs
- Logs/Monitoring
- Markup Generation
- Photo/Video/Audio
- Premium Modules
- Process Modules
- Proof of Concept
- SEO/Accessibility
- Site Profiles
- Social, Feeds, Services
- Text Formatters
- Other Modules
- Users and Access
Disclaimer
*Use modules at your own risk. There are no guarantees or warranties. It is recommended that you backup your site and database before installing new modules.