Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace head_title with Kicker #163

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,13 @@ The `volto.navtitle` behavior can be enabled in the generic setup XML definition
</object>
```

### Head title behavior
### Kicker behavior

The `headtitle` behavior makes content types provide a `headtitle` field that can be used by Volto in teasers and other content types.
The `volto.kicker` behavior adds a Kicker field that can be used to display a line of text above the title.

The `volto.head_title` behavior can be enabled in the generic setup XML definition of a content type, for example in `/profiles/default/types/MyContentType.xml`:
(The internal name of the field is `head_title`, for backwards-compatibility reasons.)

This behavior can be enabled in the generic setup XML definition of a content type, for example in `/profiles/default/types/MyContentType.xml`:

```xml
<?xml version="1.0" encoding="UTF-8" ?>
Expand All @@ -222,12 +224,15 @@ The `volto.head_title` behavior can be enabled in the generic setup XML definiti
<!-- Enabled behaviors -->
<property name="behaviors" purge="false">
...
<element value="volto.head_title" />
<element value="volto.kicker" />
</property>
...
</object>
```

> [!NOTE]
> The previous name of this behavior, `volto.head_title`, was deprecated in `plone.volto` 5.0.

### Image scales

This package introduces new Plone image scales in Plone and redefines a couple of existing ones.
Expand Down
1 change: 1 addition & 0 deletions news/164.breaking
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename head_title behaviour to Kicker @iRohitSingh
4 changes: 4 additions & 0 deletions news/164.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The `volto.head_title` behavior has been renamed to `volto.kicker`.
The old name still works, but is deprecated.
Content types should be updated to use the new name.
@iRohitSingh, @davisagli
10 changes: 8 additions & 2 deletions src/plone/volto/behaviors/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@
<plone:behavior
name="volto.head_title"
title="Head title field"
description="Adds Head title field"
provides=".headtitle.IHeadTitle"
description="Deprecated (use volto.kicker instead)"
provides=".kicker.IHeadTitle"
/>
<plone:behavior
name="volto.kicker"
title="Kicker field"
description="Adds kicker field (text to be shown above the headline)"
provides=".kicker.IKicker"
/>

</configure>
18 changes: 0 additions & 18 deletions src/plone/volto/behaviors/headtitle.py

This file was deleted.

24 changes: 24 additions & 0 deletions src/plone/volto/behaviors/kicker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from plone.autoform.interfaces import IFormFieldProvider
from plone.supermodel import model
from plone.volto import _
from zope import schema
from zope.interface import provider


@provider(IFormFieldProvider)
class IKicker(model.Schema):

# The field itself is named head_title, for backwards-compatibility.
head_title = schema.TextLine(
title=_("label_kicker", default="Kicker"),
required=False,
description=_(
"help_kicker",
default="The kicker is a line of text shown above the title.",
),
)


@provider(IFormFieldProvider)
class IHeadTitle(IKicker):
"""alias for backwards-compatibility"""
28 changes: 18 additions & 10 deletions src/plone/volto/locales/de/LC_MESSAGES/plone.volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-06-26 17:33+0000\n"
"POT-Creation-Date: 2024-12-11 17:41+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -21,9 +21,9 @@ msgstr ""
msgid "A site migrated to Volto in this Plone backend will still be accessible through the Plone Classic User Interface but with limited functionality. The core content types will have all their GUI RichText fields replaced by the blocks behavior for the composition of the main content. So after migration you can only edit this content using the Volto UI."
msgstr ""

#: plone/volto/behaviors/configure.zcml:42
msgid "Adds Head title field"
msgstr "Kopftitel Feld hinzufügen"
#: plone/volto/behaviors/configure.zcml:48
msgid "Adds kicker field (text to be shown above the headline)"
msgstr ""

#: plone/volto/browser/migrate_to_volto.pt:75
msgid "Advanced settings"
Expand Down Expand Up @@ -57,6 +57,10 @@ msgstr ""
msgid "Default Pages of Folders are merged with the Folderish Pages that replace the Folder wherever that is possible. This works well with Pages and Collections where the text and/or query are added to the folderish page that replaces the Folder."
msgstr ""

#: plone/volto/behaviors/configure.zcml:42
msgid "Deprecated (use volto.kicker instead)"
msgstr ""

#: plone/volto/profiles/coresandbox/types/example.xml
msgid "Example"
msgstr ""
Expand All @@ -77,6 +81,10 @@ msgstr ""
msgid "It is recommendet to use the default settings but here you can disable some of the migration-steps."
msgstr ""

#: plone/volto/behaviors/configure.zcml:48
msgid "Kicker field"
msgstr ""

#: plone/volto/browser/migrate_richtext.pt:130
msgid "Migrate"
msgstr ""
Expand Down Expand Up @@ -229,9 +237,9 @@ msgstr ""
msgid "heading_available_languages"
msgstr ""

#. Default: "The header title is shown above the title in teasers."
#: plone/volto/behaviors/headtitle.py:14
msgid "help_head_title"
#. Default: "The kicker is a line of text shown above the title."
#: plone/volto/behaviors/kicker.py:14
msgid "help_kicker"
msgstr "Der Kopftitel wird in Teaser-Blöcken über dem Titel angezeigt."

#. Default: "Insert an image that will be used in listing and teaser blocks."
Expand All @@ -240,9 +248,9 @@ msgstr "Der Kopftitel wird in Teaser-Blöcken über dem Titel angezeigt."
msgid "help_previewimage"
msgstr "Bild einfügen welches in Auflistungen und Anreißer-Blöcken verwendet wird."

#. Default: "Header title"
#: plone/volto/behaviors/headtitle.py:12
msgid "label_head_title"
#. Default: "Kicker"
#: plone/volto/behaviors/kicker.py:12
msgid "label_kicker"
msgstr "Kopftitel"

#. Default: "Preview image"
Expand Down
26 changes: 17 additions & 9 deletions src/plone/volto/locales/en/LC_MESSAGES/plone.volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-06-26 17:33+0000\n"
"POT-Creation-Date: 2024-12-11 17:41+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -21,8 +21,8 @@ msgstr ""
msgid "A site migrated to Volto in this Plone backend will still be accessible through the Plone Classic User Interface but with limited functionality. The core content types will have all their GUI RichText fields replaced by the blocks behavior for the composition of the main content. So after migration you can only edit this content using the Volto UI."
msgstr ""

#: plone/volto/behaviors/configure.zcml:42
msgid "Adds Head title field"
#: plone/volto/behaviors/configure.zcml:48
msgid "Adds kicker field (text to be shown above the headline)"
msgstr ""

#: plone/volto/browser/migrate_to_volto.pt:75
Expand Down Expand Up @@ -57,6 +57,10 @@ msgstr ""
msgid "Default Pages of Folders are merged with the Folderish Pages that replace the Folder wherever that is possible. This works well with Pages and Collections where the text and/or query are added to the folderish page that replaces the Folder."
msgstr ""

#: plone/volto/behaviors/configure.zcml:42
msgid "Deprecated (use volto.kicker instead)"
msgstr ""

#: plone/volto/profiles/coresandbox/types/example.xml
msgid "Example"
msgstr ""
Expand All @@ -77,6 +81,10 @@ msgstr ""
msgid "It is recommendet to use the default settings but here you can disable some of the migration-steps."
msgstr ""

#: plone/volto/behaviors/configure.zcml:48
msgid "Kicker field"
msgstr ""

#: plone/volto/browser/migrate_richtext.pt:130
msgid "Migrate"
msgstr ""
Expand Down Expand Up @@ -229,9 +237,9 @@ msgstr ""
msgid "heading_available_languages"
msgstr ""

#. Default: "The header title is shown above the title in teasers."
#: plone/volto/behaviors/headtitle.py:14
msgid "help_head_title"
#. Default: "The kicker is a line of text shown above the title."
#: plone/volto/behaviors/kicker.py:14
msgid "help_kicker"
msgstr ""

#. Default: "Insert an image that will be used in listing and teaser blocks."
Expand All @@ -240,9 +248,9 @@ msgstr ""
msgid "help_previewimage"
msgstr ""

#. Default: "Header title"
#: plone/volto/behaviors/headtitle.py:12
msgid "label_head_title"
#. Default: "Kicker"
#: plone/volto/behaviors/kicker.py:12
msgid "label_kicker"
msgstr ""

#. Default: "Preview image"
Expand Down
28 changes: 18 additions & 10 deletions src/plone/volto/locales/es/LC_MESSAGES/plone.volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2024-06-26 17:33+0000\n"
"POT-Creation-Date: 2024-12-11 17:41+0000\n"
"PO-Revision-Date: 2021-11-21 16:58+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand All @@ -23,9 +23,9 @@ msgstr ""
msgid "A site migrated to Volto in this Plone backend will still be accessible through the Plone Classic User Interface but with limited functionality. The core content types will have all their GUI RichText fields replaced by the blocks behavior for the composition of the main content. So after migration you can only edit this content using the Volto UI."
msgstr ""

#: plone/volto/behaviors/configure.zcml:42
msgid "Adds Head title field"
msgstr "Añade el campo de título de cabecera"
#: plone/volto/behaviors/configure.zcml:48
msgid "Adds kicker field (text to be shown above the headline)"
msgstr ""

#: plone/volto/browser/migrate_to_volto.pt:75
msgid "Advanced settings"
Expand Down Expand Up @@ -59,6 +59,10 @@ msgstr ""
msgid "Default Pages of Folders are merged with the Folderish Pages that replace the Folder wherever that is possible. This works well with Pages and Collections where the text and/or query are added to the folderish page that replaces the Folder."
msgstr ""

#: plone/volto/behaviors/configure.zcml:42
msgid "Deprecated (use volto.kicker instead)"
msgstr ""

#: plone/volto/profiles/coresandbox/types/example.xml
msgid "Example"
msgstr ""
Expand All @@ -79,6 +83,10 @@ msgstr ""
msgid "It is recommendet to use the default settings but here you can disable some of the migration-steps."
msgstr ""

#: plone/volto/behaviors/configure.zcml:48
msgid "Kicker field"
msgstr ""

#: plone/volto/browser/migrate_richtext.pt:130
msgid "Migrate"
msgstr ""
Expand Down Expand Up @@ -231,9 +239,9 @@ msgstr ""
msgid "heading_available_languages"
msgstr ""

#. Default: "The header title is shown above the title in teasers."
#: plone/volto/behaviors/headtitle.py:14
msgid "help_head_title"
#. Default: "The kicker is a line of text shown above the title."
#: plone/volto/behaviors/kicker.py:14
msgid "help_kicker"
msgstr "El título del cabecera se muestra encima del título en los bloques teaser."

#. Default: "Insert an image that will be used in listing and teaser blocks."
Expand All @@ -242,9 +250,9 @@ msgstr "El título del cabecera se muestra encima del título en los bloques tea
msgid "help_previewimage"
msgstr "Introduzca la imagen que se utilizará en los listados y otros bloques"

#. Default: "Header title"
#: plone/volto/behaviors/headtitle.py:12
msgid "label_head_title"
#. Default: "Kicker"
#: plone/volto/behaviors/kicker.py:12
msgid "label_kicker"
msgstr "Título de cabecera"

#. Default: "Preview image"
Expand Down
28 changes: 18 additions & 10 deletions src/plone/volto/locales/eu/LC_MESSAGES/plone.volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2024-06-26 17:33+0000\n"
"POT-Creation-Date: 2024-12-11 17:41+0000\n"
"PO-Revision-Date: 2021-11-21 16:50+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand All @@ -23,9 +23,9 @@ msgstr ""
msgid "A site migrated to Volto in this Plone backend will still be accessible through the Plone Classic User Interface but with limited functionality. The core content types will have all their GUI RichText fields replaced by the blocks behavior for the composition of the main content. So after migration you can only edit this content using the Volto UI."
msgstr ""

#: plone/volto/behaviors/configure.zcml:42
msgid "Adds Head title field"
msgstr "Goiburuko izenburua gehitu"
#: plone/volto/behaviors/configure.zcml:48
msgid "Adds kicker field (text to be shown above the headline)"
msgstr ""

#: plone/volto/browser/migrate_to_volto.pt:75
msgid "Advanced settings"
Expand Down Expand Up @@ -59,6 +59,10 @@ msgstr ""
msgid "Default Pages of Folders are merged with the Folderish Pages that replace the Folder wherever that is possible. This works well with Pages and Collections where the text and/or query are added to the folderish page that replaces the Folder."
msgstr ""

#: plone/volto/behaviors/configure.zcml:42
msgid "Deprecated (use volto.kicker instead)"
msgstr ""

#: plone/volto/profiles/coresandbox/types/example.xml
msgid "Example"
msgstr ""
Expand All @@ -79,6 +83,10 @@ msgstr ""
msgid "It is recommendet to use the default settings but here you can disable some of the migration-steps."
msgstr ""

#: plone/volto/behaviors/configure.zcml:48
msgid "Kicker field"
msgstr ""

#: plone/volto/browser/migrate_richtext.pt:130
msgid "Migrate"
msgstr ""
Expand Down Expand Up @@ -231,9 +239,9 @@ msgstr ""
msgid "heading_available_languages"
msgstr ""

#. Default: "The header title is shown above the title in teasers."
#: plone/volto/behaviors/headtitle.py:14
msgid "help_head_title"
#. Default: "The kicker is a line of text shown above the title."
#: plone/volto/behaviors/kicker.py:14
msgid "help_kicker"
msgstr "Goiburukoan erabiliko den izenburua"

#. Default: "Insert an image that will be used in listing and teaser blocks."
Expand All @@ -242,9 +250,9 @@ msgstr "Goiburukoan erabiliko den izenburua"
msgid "help_previewimage"
msgstr "Kargatu zerrendetan eta destakatuen blokeetan defektuz erabiliko den irudia"

#. Default: "Header title"
#: plone/volto/behaviors/headtitle.py:12
msgid "label_head_title"
#. Default: "Kicker"
#: plone/volto/behaviors/kicker.py:12
msgid "label_kicker"
msgstr "Goiburuko izenburua"

#. Default: "Preview image"
Expand Down
Loading
Loading