{"id":20770872,"url":"https://github.com/codemonauts/craft3-sites-field","last_synced_at":"2026-04-24T10:04:46.844Z","repository":{"id":82653755,"uuid":"199030437","full_name":"codemonauts/craft3-sites-field","owner":"codemonauts","description":"Craft 3 Field type that allows the selection of Craft sites.","archived":false,"fork":false,"pushed_at":"2018-03-14T19:25:17.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-25T22:31:15.445Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"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/codemonauts.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2019-07-26T14:25:39.000Z","updated_at":"2023-12-11T03:11:24.000Z","dependencies_parsed_at":"2023-03-14T23:00:37.990Z","dependency_job_id":null,"html_url":"https://github.com/codemonauts/craft3-sites-field","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codemonauts/craft3-sites-field","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fcraft3-sites-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fcraft3-sites-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fcraft3-sites-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fcraft3-sites-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemonauts","download_url":"https://codeload.github.com/codemonauts/craft3-sites-field/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fcraft3-sites-field/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32218290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T09:47:08.147Z","status":"ssl_error","status_checked_at":"2026-04-24T09:46:41.165Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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:12:37.446Z","updated_at":"2026-04-24T10:04:46.804Z","avatar_url":"https://github.com/codemonauts.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sites Field for Craft 3\n\nThis plugin provides a field type for choosing sites. Entries using this field can then access the site ID in their templates.\n\n---\n\n## Requirements\n\n* Craft CMS 3.0.0-RC1 or above\n\n## Example Usage\n\nTo display only events related to the current site you could use the following logic:\n\n```twig\n{% set events = craft.entries.site('main').section('blog').type('event').orderBy('date asc').all() %}\n{% for event in events %}\n  {% if craft.app.sites.currentSite.id in event.siteIds %}\n    {# show this event... #}\n  {% endif %}\n{% endfor %}\n```\n\n\u003e Note: `siteIds` returns an array of site ID's which you can use the twig [in](https://twig.symfony.com/doc/2.x/templates.html#containment-operator) operator.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonauts%2Fcraft3-sites-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemonauts%2Fcraft3-sites-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonauts%2Fcraft3-sites-field/lists"}