From c1f7006ce149dc498e97aa92f5f4edf75fe51a95 Mon Sep 17 00:00:00 2001 From: Matteo Gamboz Date: Fri, 21 Feb 2025 13:43:31 +0100 Subject: [PATCH 1/6] zconsole needs zope.conf (not zope.ini) --- docs/admin-guide/run-plone.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin-guide/run-plone.md b/docs/admin-guide/run-plone.md index 66eb6ed30..d4c561be0 100644 --- a/docs/admin-guide/run-plone.md +++ b/docs/admin-guide/run-plone.md @@ -92,7 +92,7 @@ Buildout: pip: : ```shell - bin/zconsole debug instance/etc/zope.ini + bin/zconsole debug instance/etc/zope.conf ``` `cookiecutter-plone-starter`: From 9f3032003f14cd4d909765bae0858ec30bb1728a Mon Sep 17 00:00:00 2001 From: Matteo Gamboz Date: Fri, 21 Feb 2025 13:46:40 +0100 Subject: [PATCH 2/6] add a note to setRequest taken from https://community.plone.org/t/interactive-shell-for-debugging-with-plone-6-docker-compose-the-wsgi-equivalent-of-bin-instance-debug/16370/9 --- docs/admin-guide/run-plone.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/admin-guide/run-plone.md b/docs/admin-guide/run-plone.md index d4c561be0..e34f46869 100644 --- a/docs/admin-guide/run-plone.md +++ b/docs/admin-guide/run-plone.md @@ -101,3 +101,11 @@ pip: ``` For any of these commands, press {kbd}`ctrl-d` to stop the process. + +### Set a "fake" request + +To make sure that the request is fully set up for any code that uses `zope.globalrequest.getRequest` you might need to do: +: ```python + from zope.globalrequest import setRequest + setRequest(app.REQUEST) + ``` From 08d2ee761322b83fdec60acb4819d5e405c08dea Mon Sep 17 00:00:00 2001 From: Matteo Gamboz Date: Fri, 21 Feb 2025 14:57:04 +0100 Subject: [PATCH 3/6] Apply suggestions from code review Co-authored-by: Steve Piercy --- docs/admin-guide/run-plone.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/admin-guide/run-plone.md b/docs/admin-guide/run-plone.md index e34f46869..f70e61cf1 100644 --- a/docs/admin-guide/run-plone.md +++ b/docs/admin-guide/run-plone.md @@ -104,8 +104,9 @@ For any of these commands, press {kbd}`ctrl-d` to stop the process. ### Set a "fake" request -To make sure that the request is fully set up for any code that uses `zope.globalrequest.getRequest` you might need to do: -: ```python +To make sure that the request is fully set up for any code that uses `zope.globalrequest.getRequest`, you might need to use the following code. + +```python from zope.globalrequest import setRequest setRequest(app.REQUEST) ``` From 5d5bc256dddf8f30fad7f8661dc91111fd154744 Mon Sep 17 00:00:00 2001 From: Matteo Gamboz Date: Fri, 21 Feb 2025 14:59:01 +0100 Subject: [PATCH 4/6] tidy up code example fix https://github.com/plone/documentation/pull/1872/files#r1965496404 --- docs/admin-guide/run-plone.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/admin-guide/run-plone.md b/docs/admin-guide/run-plone.md index f70e61cf1..d070beda3 100644 --- a/docs/admin-guide/run-plone.md +++ b/docs/admin-guide/run-plone.md @@ -107,6 +107,6 @@ For any of these commands, press {kbd}`ctrl-d` to stop the process. To make sure that the request is fully set up for any code that uses `zope.globalrequest.getRequest`, you might need to use the following code. ```python - from zope.globalrequest import setRequest - setRequest(app.REQUEST) - ``` +from zope.globalrequest import setRequest +setRequest(app.REQUEST) +``` From 4e4266ae912f806f09cf3586f76926b4bb9e2869 Mon Sep 17 00:00:00 2001 From: Matteo Gamboz Date: Mon, 24 Feb 2025 16:12:41 +0100 Subject: [PATCH 5/6] Add an HTTPRequest at app.REQUEST before calling setRequest(app.REQUEST) --- docs/admin-guide/run-plone.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/admin-guide/run-plone.md b/docs/admin-guide/run-plone.md index d070beda3..f1d8ab8f0 100644 --- a/docs/admin-guide/run-plone.md +++ b/docs/admin-guide/run-plone.md @@ -107,6 +107,9 @@ For any of these commands, press {kbd}`ctrl-d` to stop the process. To make sure that the request is fully set up for any code that uses `zope.globalrequest.getRequest`, you might need to use the following code. ```python +from Testing.makerequest import makerequest from zope.globalrequest import setRequest + +app = makerequest(app) setRequest(app.REQUEST) ``` From 95aeba3ab47e18142b6dfdb9bb5501c66fdb7cb5 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 24 Feb 2025 23:54:21 -0800 Subject: [PATCH 6/6] Add guide for choosing one Classic UI theme or another, thanks to @jensens! --- docs/classic-ui/theming/index.md | 40 +++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/docs/classic-ui/theming/index.md b/docs/classic-ui/theming/index.md index 6a7357a7b..5def5f373 100644 --- a/docs/classic-ui/theming/index.md +++ b/docs/classic-ui/theming/index.md @@ -13,13 +13,41 @@ myst: This section of the documentation describes how to theme Classic UI. -Small theme changes—such as the site logo and favicon and minimal CSS changes—can be made by {doc}`changing theme settings through the web `. -Other theming methods should be used for larger customizations or entire website designs. -These other methods include creating an add-on, tweaking the Barceloneta theme, Diazo, and from scratch. -```{todo} -Provide more information about the other methods and why a developer should choose one versus another. -``` +## TTW or add-on? + +Small theme changes—such as the site logo and favicon and minimal CSS changes—can be made by {doc}`changing theme settings through the web (TTW) `. +This method is especially useful for short-lived or prototype sites. +It allows you to make minor adjustments without needing to dive into code or production-level setups. +TTW can be convenient for quick experiments, websites that don't require complex theming, or short-lived websites. + +An add-on allows you to keep your customization modular, and it provides a more structured approach to larger-scale theming. +This method is ideal for more permanent or complex customizations since it enables easier maintenance and portability. + +The customized Barceloneta theme, creating a theme from scratch, and Diazo offer even more flexibility. + +Barceloneta theme +: Ideal for a starting point, especially if you want to tweak it as an existing, solid theme. + You can customize its components and styles without starting from zero. + +From scratch +: If your project requires something completely unique and none of the existing themes fit, building a theme from scratch would be the way to go. + This is most appropriate for highly customized websites with distinct design requirements. + +Diazo +: Diazo can be used where designers create a self-contained HTML page with CSS and JavaScript without customizing templates. + It can be used for simple themes or for more advanced methods. + + Its advantages include allowing more complex themes where content needs to remain flexible, and you want full control over the markup. + + Its disadvantages include a possible negative performance impact from the rendering process, and a more complex and difficult to maintain theme. + +To summarize: + +- Use {doc}`TTW ` for minor changes or testing. +- Use {doc}`add-ons ` for production-level theming that needs scalability, maintainability, and modularity to customize Barceloneta or to write themes from scratch. +- Use {doc}`Diazo ` in your add-on if you need to modify the markup without touching the page templates. + ## How-to guides