Open vangogs opened 5 years ago
this seems to be an issue in some cases when the slugs are the same: tried to assign a layout to a page but it's only applied in one language, for another page it works fine, and don't see any obvious difference in configuration between the two pages, in all languages the slugs are the same
grav 1.6.23 & gantry 5.4.34
this seems to be an issue in some cases when the slugs are the same:
upon further investigation, this seems unrelated but still an issue, it occurs when:
{{ anchors(page.content, 'h2', []) | raw }}
It is true for ANY page assignment if you use page slug (which you have to, cause you're multilingual). Except for HOME, that does work. You can't make a multilingual site now with Grav and Gantry.
I'm finding a way (but not an elegant way) on Grav v1.7.37.1 with Gantry v5.5.14 by:
a) Creating separate Outlines (EN, FR), then on the Assignments tab, assigning them a Language and (where applicable, a Page Type) but NOT a Page. b) Editing the Layout Assignments manually, e.g.,
page:
-
conditions-de-vente: true
electronic-funds-transfer-eft-for-vendors: false
language:
-
fr: true
type: { }
Note the explicit false setting for the corresponding EN path above. You have to block the possibility that someone will, in this example, visit the EN url with the FR language prefix, e.g.,
/fr/electronic-funds-transfer-eft-for-vendors
Because Grav/Gantry WILL display the page with the wrong Outline applied. it should throw a 404, but it doesn't.
NOTES:
a) You can still use the Gantry Admin for everything EXCEPT the Assignments page. This is an ugly workaround, but it's better than telling my client it can't be done ¯_(ツ)_/¯
b) I'm using git to manage my themename/config
files, so I can recover if I ever forget and use the Assignments page.
c) Making extensive use of unique Page Types could allow you to build the whole site in the UI, with no manual editing.
I just switched to joomla. No support from the community. Joomla 4 is actually even faster.
пт, 24 февр. 2023 г., 21:09 thekenshow @.***>:
I'm finding a way (but not an elegant way) on Grav v1.7.37.1 with Gantry v5.5.14 by:
a) Creating separate Outlines (EN, FR), then on the Assignments tab, assigning them a Language and (where applicable, a Page Type) but NOT a Page. b) Editing the Layout Assignments manually, e.g.,
page:
-
conditions-de-vente: true electronic-funds-transfer-eft-for-vendors: false
language:
-
fr: true
type: { }
Note the explicit false setting for the corresponding EN path above. You have to block the possibility that someone will, in this example, visit the EN url with the FR language prefix, e.g.,
/fr/electronic-funds-transfer-eft-for-vendors
Because Grav/Gantry WILL display the page with the wrong Outline applied. it should throw a 404, but it doesn't.
NOTES: a) You can still use the Gantry Admin for everything EXCEPT the Assignments page. This is an ugly workaround, but it's better than telling my client it can't be done ¯(ツ)/¯ b) I'm using git to manage my themename/config files, so I can recover if I ever forget and use the Assignments page. c) Making extensive use of unique Page Types could allow you to build the whole site in the UI, with no manual editing.
— Reply to this email directly, view it on GitHub https://github.com/gantry/gantry5/issues/2467#issuecomment-1444169802, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5V5L2GB5IBZ3XSDIV3MYILWZD2NLANCNFSM4GX65MXA . You are receiving this because you commented.Message ID: @.***>
Layout assignment doesn't work for multiple languages if slugs are translated. Assignment works only for one language which was selected in Admin while entering Gantry admin section. How to repeat
0) Grav 1.5.8 + Gantry 5.4.27 1) Create english language page with folder/slug = "test" 2) Create (german) translation of page above with translated slug = "testing" 3) While English selected in admin, open Gantry/Layouts/Assignments for Custom Layout 4) Enable Layout for Test page (and all languages) 5) Save
If open page /en/test - it has Custom Layout If open page /de/testing - it has Default layout (not Custom)
See assignments.yaml for Custom layout:
If I do the same for other language 3) While German selected in admin, open Gantry/Layouts/Assignments for Custom Layout 4) Enable Layout for Test page (and all languages) 5) Save
Custom layout will work only for german page, not for english, See assignments.yaml for Custom layout:
If I manually update this file and add both slugs to assignments.yaml:
then everything works correctly for both languages, but if I use Gantry admin again, then it will keep assignment only for one translation (not both)
Expected result: It must be possible to set layout assignments for all languages using Gantry Admin.
Basically this problem applies also for particle assignments in Positions.