diff --git a/src/recensio/plone/profiles/default/actions.xml b/src/recensio/plone/profiles/default/actions.xml new file mode 100644 index 0000000..8069197 --- /dev/null +++ b/src/recensio/plone/profiles/default/actions.xml @@ -0,0 +1,113 @@ + + + + Portal tabs + + label_nav_reviews + + string:${portal/rezensionen/absolute_url}/rezensionen + + + + + True + + + label_nav_journals + + portal/rezensionen/zeitschriften/absolute_url + + + + + True + + + label_nav_themes + + string:themen-epochen-regionen + + + + + True + + + label_nav_authors + + string:${portal_url}/@@authorsearch + + + + + True + + + label_nav_search + + string:${portal_url}/@@search + + + + + True + + + label_nav_about_us + + string:${portal_url}/ueber-uns + + + + + True + + + diff --git a/src/recensio/plone/upgrades/v1/20230510221727_set_menu_structure/__init__.py b/src/recensio/plone/upgrades/v1/20230510221727_set_menu_structure/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/recensio/plone/upgrades/v1/20230510221727_set_menu_structure/actions.xml b/src/recensio/plone/upgrades/v1/20230510221727_set_menu_structure/actions.xml new file mode 100644 index 0000000..8069197 --- /dev/null +++ b/src/recensio/plone/upgrades/v1/20230510221727_set_menu_structure/actions.xml @@ -0,0 +1,113 @@ + + + + Portal tabs + + label_nav_reviews + + string:${portal/rezensionen/absolute_url}/rezensionen + + + + + True + + + label_nav_journals + + portal/rezensionen/zeitschriften/absolute_url + + + + + True + + + label_nav_themes + + string:themen-epochen-regionen + + + + + True + + + label_nav_authors + + string:${portal_url}/@@authorsearch + + + + + True + + + label_nav_search + + string:${portal_url}/@@search + + + + + True + + + label_nav_about_us + + string:${portal_url}/ueber-uns + + + + + True + + + diff --git a/src/recensio/plone/upgrades/v1/20230510221727_set_menu_structure/upgrade.py b/src/recensio/plone/upgrades/v1/20230510221727_set_menu_structure/upgrade.py new file mode 100644 index 0000000..d970f9d --- /dev/null +++ b/src/recensio/plone/upgrades/v1/20230510221727_set_menu_structure/upgrade.py @@ -0,0 +1,46 @@ +from ftw.upgrade import UpgradeStep +from plone import api + + +class SetMenuStructure(UpgradeStep): + """Set menu structure.""" + + def __call__(self): + self.install_upgrade_profile() + + # Set the "rezensionen" folder to use the "latest-review-items" layout + # for all languages + portal = api.portal.get() + reviews = portal.rezensionen + + reviews_de = api.content.create( + container=reviews, + type="Document", + id="rezensionen", + title="Rezensionen", + language="de", + ) + reviews_de.setLayout("latest-review-items") + api.content.transition(reviews_de, "publish") + + reviews_fr = api.content.create( + container=reviews, + type="Document", + id="recensions", + title="Recensions", + language="fr", + ) + reviews_fr.setLayout("latest-review-items") + api.content.transition(reviews_fr, "publish") + + reviews_en = api.content.create( + container=reviews, + type="Document", + id="reviews", + title="Reviews", + language="en", + ) + reviews_en.setLayout("latest-review-items") + api.content.transition(reviews_en, "publish") + + reviews.setDefaultPage("rezensionen")