{"id":20770566,"url":"https://github.com/codemonauts/craft-unit-field","last_synced_at":"2025-04-30T13:49:45.671Z","repository":{"id":56980858,"uuid":"278842989","full_name":"codemonauts/craft-unit-field","owner":"codemonauts","description":"Field with Range of Values and predefined Units of Measurement for Craft CMS","archived":false,"fork":false,"pushed_at":"2022-05-06T14:35:48.000Z","size":79,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T08:55:20.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemonauts.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-11T10:54:28.000Z","updated_at":"2023-12-11T02:28:30.000Z","dependencies_parsed_at":"2022-08-21T11:20:32.990Z","dependency_job_id":null,"html_url":"https://github.com/codemonauts/craft-unit-field","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fcraft-unit-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fcraft-unit-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fcraft-unit-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fcraft-unit-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemonauts","download_url":"https://codeload.github.com/codemonauts/craft-unit-field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251714662,"owners_count":21631768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T12:10:27.443Z","updated_at":"2025-04-30T13:49:45.631Z","avatar_url":"https://github.com/codemonauts.png","language":"PHP","readme":"# Field with Range of Values and predefined Units of Measurement for Craft CMS\n\n![Icon](resources/unitfield.png)\n\nThis field allows you to enter two values as range and selecting a predefined unit of measurement. Perfect to store dimensions or other ranges of values for products.\n\n## Requirements\n\n * Craft CMS \u003e= 4.0.0\n\n## Installation\n\nOpen your terminal and go to your Craft project:\n\n``` shell\ncd /path/to/project\ncomposer require codemonauts/craft-unit-field\n./craft install/plugin unitfield\n```\n\n## Plugin Settings\n\nIn the settings you can define all available units of measurement. You can also group units to easier select them later.\n\n![Plugin settings](resources/plugin-settings.png)\n\n## Field Settings\n\nIn every field you can set a default unit of measurement and a Twig template to render the table cells in the index of entries.\n\n![Field settings](resources/field-settings.png)\n\n## Input\n\nThe input field has two text inputs for the minimum and maximum value and a dropdown to choose the unit of measurement.\n\n![Input](resources/input.png)\n\n## Usage in templates\n\nIn templates you can access the minimum and maximum values as well as the unit value and the corresponding label:\n\n```twig\n{{ entry.myField.min }} to {{ entry.myField.max }} {{ entry.myField.unitLabel }}\n```\n\n## Translation\n\nAll label can be translated. Use a translation file named `unitfield.php` in the language's translation directory. \n\nWith ❤ by [codemonauts](https://codemonauts.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonauts%2Fcraft-unit-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemonauts%2Fcraft-unit-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonauts%2Fcraft-unit-field/lists"}