{"id":19388844,"url":"https://github.com/james2doyle/pyro-pagewidgets-field","last_synced_at":"2025-07-26T12:41:12.205Z","repository":{"id":7271306,"uuid":"8584628","full_name":"james2doyle/pyro-pagewidgets-field","owner":"james2doyle","description":"Add widgets to a page by selecting the widget and then ordering it.","archived":false,"fork":false,"pushed_at":"2013-11-02T17:52:17.000Z","size":146,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T19:59:55.617Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/james2doyle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-05T17:03:14.000Z","updated_at":"2017-02-22T08:44:46.000Z","dependencies_parsed_at":"2022-08-28T13:21:01.561Z","dependency_job_id":null,"html_url":"https://github.com/james2doyle/pyro-pagewidgets-field","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/james2doyle/pyro-pagewidgets-field","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fpyro-pagewidgets-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fpyro-pagewidgets-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fpyro-pagewidgets-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fpyro-pagewidgets-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/james2doyle","download_url":"https://codeload.github.com/james2doyle/pyro-pagewidgets-field/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fpyro-pagewidgets-field/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261792518,"owners_count":23210326,"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-10T10:13:52.013Z","updated_at":"2025-06-25T02:38:46.387Z","avatar_url":"https://github.com/james2doyle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"pyro-pagewidgets-field\n======================\n\nAdd widgets to a page by selecting the widget and then ordering it.\n\nSteps\n-----\n\n* Create an area for page specific widgets\n* Create widgets as normal and place them in that area\n* Add the field to a page and choose that area as the source\n* Go to a page with that type and choose widgets from the multiselect\n* Order them with the sortable list\n\n### Field Creation\n\n![Field Creation](http://files.getcloudapp.com/items/3G3j1H3B01432d2s2z31/Screen%20Shot%202013-03-05%20at%2012.08.12%20PM.png)\n\n### Field during page edit\n\n![Order Items](http://files.getcloudapp.com/items/0G0v263e2L120A2r433Q/Screen%20Shot%202013-03-05%20at%2012.10.14%20PM.png)\n\nTemplate Usage\n--------------\n\nFairly easy. Still uses the native/included widgets:instance plugin\n\n``` html\n\u003cdiv class=\"a-bunch-of-page-widgets\"\u003e\n  {{ my_pagewidgets_field_slug }}\n    {{ widgets:instance id=id }}\n  {{ /my_pagewidgets_field_slug }}\n\u003c/div\u003e\n```\n\nWhy\n---\n\nClients kept asking to add a widget to a specific page and they were reluctant to learn how to use the widgets short code. Also for my own piece of mind I didn't want them editing templates and breaking stuff.\n\nNow they can manage their widgets on a page-by-page basis instead of area-by-area. Of course area widgets still work but it is up to the template to decide what order to set them in.\n\n``` html\n\u003cdiv class=\"a-bunch-of-page-widgets\"\u003e\n  {{ widgets:area slug=\"left-sidebar\" }}\n  {{ my_pagewidgets_field_slug }}\n    {{ widgets:instance id=id }}\n  {{ /my_pagewidgets_field_slug }}\n\u003c/div\u003e\n```\n\nOf course this is what I mean. The widgets in the left-sidebar area will come first and then the widgets assigned to the page will follow.\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2013 James Doyle(james2doyle) \u003cjames2doyle@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames2doyle%2Fpyro-pagewidgets-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjames2doyle%2Fpyro-pagewidgets-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames2doyle%2Fpyro-pagewidgets-field/lists"}