{"id":31782298,"url":"https://github.com/zopefoundation/z3c.jbot","last_synced_at":"2025-10-10T09:18:24.920Z","repository":{"id":7208449,"uuid":"8514008","full_name":"zopefoundation/z3c.jbot","owner":"zopefoundation","description":"Drop-in template overrides.","archived":false,"fork":false,"pushed_at":"2025-08-05T00:38:54.000Z","size":278,"stargazers_count":2,"open_issues_count":3,"forks_count":5,"subscribers_count":62,"default_branch":"master","last_synced_at":"2025-08-30T18:44:30.660Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/zopefoundation.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.rst","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":"2013-03-02T01:43:19.000Z","updated_at":"2025-08-05T00:38:57.000Z","dependencies_parsed_at":"2024-02-08T08:24:56.465Z","dependency_job_id":"5eb0f5cf-83e4-4411-91b3-00065272e69e","html_url":"https://github.com/zopefoundation/z3c.jbot","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/zopefoundation/z3c.jbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zopefoundation%2Fz3c.jbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zopefoundation%2Fz3c.jbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zopefoundation%2Fz3c.jbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zopefoundation%2Fz3c.jbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zopefoundation","download_url":"https://codeload.github.com/zopefoundation/z3c.jbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zopefoundation%2Fz3c.jbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277782875,"owners_count":25876234,"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","status":"online","status_checked_at":"2025-10-01T02:00:09.286Z","response_time":88,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-10-10T09:18:21.960Z","updated_at":"2025-10-10T09:18:24.913Z","avatar_url":"https://github.com/zopefoundation.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Overview\n========\n\nThe ``z3c.jbot`` (or \"Just a bunch of templates\") package allows easy\ncustomization of existing templates and images. It works on Zope 2 and\nZope 3.\n\nThe Chameleon rendering engine is supported.\n\nUse of this package adds a small (2-3 ms per request on Plone) to the\ntotal application response time.\n\nUsage\n-----\n\nTo override a particular file, first determine its *canonical\nfilename*. It's defined as the path relative to the package within\nwhich the file is located; directory separators are replaced with\ndots.\n\nExample:\n\n  Suppose you want to override: /plone/app/layout/viewlets/logo.pt\n\n  You would use the filename:   plone.app.layout.viewlets.logo.pt\n\nSimply drop the file in a directory and register that directory for\nuse with jbot using a ZCML-directive::\n\n  \u003cinclude package=\"z3c.jbot\" file=\"meta.zcml\" /\u003e\n\n  \u003cbrowser:jbot\n      directory=\"\u003cpath\u003e\"\n      layer=\"\u003clayer\u003e\" /\u003e\n\nTemplates in views, viewlets and portlets\n-----------------------------------------\n\nAny template that is defined as a class-attribute can be overriden\nusing jbot, e.g. those used in views, viewlets and portlets. The\ntemplate overrides may be registered for any request layer or only a\nspecific layer.\n\nCMF objects\n-----------\n\nAny skin-object (e.g. images, templates) on the file system (directory\nviews) can be overridden.\n\nPlone resources\n---------------\n\nIf `plone.resource` is installed, it's possible to use jbot to\noverride filesystem resources.\n\nDeprecation warnings\n--------------------\n\nImagine this situation:\n\n* You have a ``base`` package with a page template ``original.pt``.\n* Someone else overrides this in a project specific package by creating a file ``base.original.pt``.\n* Now for some reason you rename the template to ``new.pt``.\n* The template override in the project no longer works and the other person starts asking questions or complaining.\n\nTo solve this problem, you can register that a template path is deprecated.\nFirst add a dictionary to the ``base`` package, let's say in a file ``utils.py``::\n\n  deprecated_templates = {\n      \"base.original.pt\": \"base.new.pt\",\n  }\n\nIn your ``configure.zcml`` you add::\n\n  \u003cconfigure\n      xmlns=\"http://namespaces.zope.org/zope\"\n      xmlns:zcml=\"http://namespaces.zope.org/zcml\"\n      \u003e\n  ...\n    \u003cconfigure zcml:condition=\"have jbot-deprecations\"\u003e\n      \u003cinclude package=\"z3c.jbot\" file=\"meta.zcml\" /\u003e\n      \u003cbrowser:jbotDeprecated dictionary=\".utils.deprecated_templates\" /\u003e\n    \u003c/configure\u003e\n  \u003c/configure\u003e\n\nThe result is:\n\n1. The old override ``base.original.pt`` works for the new location as well.\n2. The user gets a warning that they should use ``base.new.pt`` instead.\n\nAuthor\n------\n\nMalthe Borch \u003cmborch@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzopefoundation%2Fz3c.jbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzopefoundation%2Fz3c.jbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzopefoundation%2Fz3c.jbot/lists"}