{"result":{"depiction_url":null,"edges":{"hasreference":{"objects":[{"created":"2026-10-07T11:13:38Z","object_id":{"id":2951,"is_a":["text","documentation","developerguide"],"name":"developer_resource_properties","title":{"_type":"trans","tr":{"en":"Read and update resource properties"}},"uri":"https:\/\/zotonic.com\/id\/2951"},"seq":1},{"created":"2026-10-07T11:13:38Z","object_id":{"id":1536,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_access_control","title":{"_type":"trans","tr":{"en":"Keep permission checks at the boundary"}},"uri":"https:\/\/zotonic.com\/id\/1536"},"seq":2}],"predicate":{"id":2774,"is_a":["meta","predicate"],"name":"hasreference","title":{"_type":"trans","tr":{"en":"Documentation reference"}},"uri":"https:\/\/zotonic.com\/id\/hasreference"}},"references":{"objects":[{"created":"2020-05-30T05:47:36Z","object_id":{"id":1594,"is_a":["text","documentation","cookbook"],"name":"doc_cookbook_admin_custom_layout","title":{"_type":"trans","tr":{"en":"Adjust the resource editor layout"}},"uri":"https:\/\/zotonic.com\/id\/1594"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"subject":{"objects":[{"created":"2026-10-07T11:13:38Z","object_id":{"id":2557,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_cookbook_recipe","title":"Cookbook recipe","uri":"https:\/\/zotonic.com\/id\/2557"},"seq":1},{"created":"2026-10-07T11:13:38Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-10-07T11:13:38Z","object_id":{"id":2620,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_template","title":"Template","uri":"https:\/\/zotonic.com\/id\/2620"},"seq":3},{"created":"2026-10-07T11:13:38Z","object_id":{"id":2570,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_content_authoring","title":"Content authoring","uri":"https:\/\/zotonic.com\/id\/2570"},"seq":4}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1593,"is_a":["text","documentation","cookbook"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1593"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_cookbook_admin_a_custom_widget","page_url":{"en":"https:\/\/zotonic.com\/cookbook\/1593\/add-a-field-to-the-resource-editor","x-default":"https:\/\/zotonic.com\/cookbook\/1593\/add-a-field-to-the-resource-editor"},"preview_url":null,"resource":{"body":{"_type":"trans","tr":{"en":"<p>Create <code>priv\/templates\/_admin_edit_content_extra.tpl<\/code> in the active site or module:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{% extends &quot;admin_edit_widget_std.tpl&quot; %}\n{% block widget_id %}garden-note-widget{% endblock %}\n{% block widget_title %}{_ Internal note _}{% endblock %}\n{% block widget_content %}\n    &lt;label for=&quot;{{ #note }}&quot;&gt;{_ Note _}&lt;\/label&gt;\n    &lt;textarea id=&quot;{{ #note }}&quot; name=&quot;garden_note&quot; class=&quot;form-control&quot;\n              {% if not id.is_editable %}disabled{% endif %}&gt;{{ id.garden_note|escape }}&lt;\/textarea&gt;\n{% endblock %}\n<\/code><\/pre>\n<p>The standard admin layout includes this extension point inside the resource form. Do not nest another form. If the site already has this template, include a separate widget from it instead of overwriting existing content.<\/p>\n<p>Reload an editable practice page, enter a note, save and reopen it. The value should remain. Test a read-only user too. The ordinary resource update checks edit permission; custom server handlers must perform equivalent checks.<\/p>\n<p>“Internal” is only a label here, not field-level secrecy. If this value is confidential, put it behind an appropriate model\/storage access policy rather than assuming a custom resource property is private.<\/p>"}},"category_id":{"id":318,"is_a":["meta","category"],"name":"cookbook","title":{"_type":"trans","tr":{"en":"Cookbook"}},"uri":"https:\/\/test.zotonic.com\/id\/318"},"content_group_id":{"id":339,"is_a":["meta","content_group"],"name":"default_content_group","title":{"_type":"trans","tr":{"en":"Default Content Group"}},"uri":"https:\/\/zotonic.com\/id\/default_content_group"},"created":"2020-05-30T05:47:27Z","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"doc_editorial_bundle":true,"doc_editorial_edges":{"hasreference":[1536,2951],"subject":[2557,2563,2570,2620]},"github_url":"https:\/\/github.com\/zotonic\/zotonic\/tree\/master\/doc\/cookbook\/admin-a-custom-widget.rst","is_authoritative":true,"is_dependent":false,"is_featured":false,"is_protected":false,"is_published":true,"is_unfindable":false,"language":["en"],"modified":"2026-10-07T11:13:47Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"name":"doc_cookbook_admin_a_custom_widget","pivot_geocode":null,"pivot_location_lat":null,"pivot_location_lng":null,"privacy":0,"publication_end":"9999-06-01T00:00:00Z","publication_start":"2022-02-15T10:01:35Z","slug":"add-a-field-to-the-resource-editor","summary":{"_type":"trans","tr":{"en":"Use an admin widget and the existing resource form."}},"title":{"_type":"trans","tr":{"en":"Add a field to the resource editor"}},"title_slug":{"_type":"trans","tr":{"en":"add-a-field-to-the-resource-editor"}},"tz":"UTC","uri":null,"version":33,"visible_for":0},"uri":"https:\/\/zotonic.com\/id\/1593","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1593"}},"status":"ok"}