{"id":18747156,"url":"https://github.com/spicywebau/craft-odds-and-ends","last_synced_at":"2025-04-05T05:02:30.156Z","repository":{"id":55134823,"uuid":"41473549","full_name":"spicywebau/craft-odds-and-ends","owner":"spicywebau","description":"A repo of useful tools for Craft CMS websites","archived":false,"fork":false,"pushed_at":"2025-02-27T22:47:56.000Z","size":749,"stargazers_count":53,"open_issues_count":2,"forks_count":5,"subscribers_count":6,"default_branch":"5.x","last_synced_at":"2025-03-29T04:03:37.446Z","etag":null,"topics":["craft","craft-plugin","craft3","craft4","craftcms"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spicywebau.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-27T07:59:16.000Z","updated_at":"2025-02-27T22:48:00.000Z","dependencies_parsed_at":"2023-09-24T06:06:14.639Z","dependency_job_id":"80d836c1-ef76-4100-a6fa-875cdd56fda0","html_url":"https://github.com/spicywebau/craft-odds-and-ends","commit_stats":{"total_commits":87,"total_committers":8,"mean_commits":10.875,"dds":0.3793103448275862,"last_synced_commit":"8809789707ae9240fa51dfee8e3ab344c0d709de"},"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spicywebau%2Fcraft-odds-and-ends","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spicywebau%2Fcraft-odds-and-ends/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spicywebau%2Fcraft-odds-and-ends/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spicywebau%2Fcraft-odds-and-ends/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spicywebau","download_url":"https://codeload.github.com/spicywebau/craft-odds-and-ends/tar.gz/refs/heads/5.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289409,"owners_count":20914464,"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":["craft","craft-plugin","craft3","craft4","craftcms"],"created_at":"2024-11-07T16:28:54.762Z","updated_at":"2025-04-05T05:02:30.141Z","avatar_url":"https://github.com/spicywebau.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"src/icon.svg\" width=\"100\"\u003e\n\n# Odds \u0026 Ends\n\nA collection of useful tools for Craft CMS websites.\n\n## Field types\n\n### Width\nThis lets you define the width of a block as well as left and right padding. This field simply outputs three sets of classes which can be defined when setting the field up.\n\n![Width Field Settings](docs/assets/width-settings.png)\n![Width Field](docs/assets/width-field.png)\n\n### Author Instructions\nThis lets you output markdown instead of a field, which is useful when you have a Matrix block that doesn’t have any fields.\n\n![Author Instructions Example](docs/assets/author-instructions-example.png)\n\n### Categories (multiple groups)\nA Categories input that lets you select multiple Category groups.\n\n### Ancestors\nAn Entries input that only shows the ancestors of the current Entry.\n\n### Search Fields\nLike the Tags input, but for entries and categories (without the auto-creation feature). If Craft Commerce is installed, search fields for products and variants are also available.\n\n### Disabled Fields\nThe same as regular fields, but disabled. Useful for situations where you want to integrate with a third party API and store that information in a field but don’t want the user to change it.\n\nThe following field types are currently supported:\n\n- Entries\n- Categories\n- Lightswitch\n- Number\n- PlainText\n- Dropdown\n- Commerce Products\n- Commerce Variants\n\n## Widgets\n\n### Roll Your Own\nA simple widget that lets you assign a template to load from your site templates folder. Go nuts.\n\n## Miscellaneous\n\n### Download File\n\nA controller action that will download an asset file.\n\nThe `id` parameter is required and must be a valid asset ID.\n\nUsage:\n```\n\u003ca href=\"{{ actionUrl('tools/tools/download-file', { id: entry.assetField.one().id }) }}\"\u003eDownload\u003c/a\u003e\n```\n\n\n## Configuration\n\nBy default, all normal field types and widgets are enabled. \nThe commerce field types are only enabled if Craft Commerce is installed and enabled.\nYou can disable each field type and widget by adding the following to your project's `config/tools.php` file:\n\n```php\nuse spicyweb\\oddsandends\\fields\\AuthorInstructions;\nuse spicyweb\\oddsandends\\fields\\DisabledProducts;\nuse spicyweb\\oddsandends\\widgets\\RollYourOwn;\n\nreturn [\n    'disableNormalFields' =\u003e [\n        AuthorInstructions::class,\n    ],\n    'disableCommerceFields' =\u003e [\n        DisabledProducts::class,\n    ],\n    'disableWidgets' =\u003e [\n        RollYourOwn::class,\n    ],\n];\n```\n\nMulti environment config is supported. See [Craft's docs](https://craftcms.com/docs/4.x/config/#multi-environment-configs) for more info.\nSee `config/tools.php` in this repo for an example on how to disable any field and widget.\n\n---\n\n*Created by [Supercool](https://supercooldesign.co.uk)*\n\u003cbr\u003e\n*Maintained by [Spicy Web](https://spicyweb.com.au)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspicywebau%2Fcraft-odds-and-ends","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspicywebau%2Fcraft-odds-and-ends","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspicywebau%2Fcraft-odds-and-ends/lists"}