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
Editable Elements and internationalization/localization #1091
Comments
Additional test using the new slug option. My index.liquid file looks like that:
Using the short syntax in the drop for the first_column, nothing appears anywhere (Wagon, Engine preview, Engine textarea of the backoffice) for the first column. Using the long path syntax in the drops for the second_column and third_column, everything appears correctly everywhere (Wagon, Egine preview, Engine textarea of the back-office). However the live editing is still broken. If I enter changes in the textarea for the first column and click the save button, such changes are saved into the database, but still do not appear (whether on the preview or the textarea).
Compare with second_column editable text as saved into the database
|
Issue should be reopened. |
Found a quick fix, unofficial. Check this file out: Replace line 89 by the following line:
by the following line:
Now you can do:
as if you had done:
with live-editing working!!!! @did I think this could somehow be factored into steam. I understand that this might have been a bug carried over from the former version. |
The issue with this fix is that the editable_text items are no longer displayed when doing a wagon serve. |
sections are the new way to go (https://doc.locomotivecms.com/v4.0/docs/section-introduction). They're much more powerful than the editable elements. |
I want my index.liquid page to be internationalized/localized. So let's create a new wagon site.
All the shizzle gets generated.
First step
app/pages/liquid.index looks like that:
I run it with a
Everything is fine.
I push it to the Engine with a
Everything works properly in the Engine.
Second step
To localize, I need to create an index.fr.liquid (as well as the underlying simple.fr.liquid and default.fr.liquid) and set the relevant locales in my config/site.yml file. My index.fr.liquid looks like that:
In Wagon, everything works fine (http://localhost:3000 renders the English version and http://localhost:3000/fr renders the French version).
In the Engine, I need to push to a new site in order to override the locales (this is fine).
In the site preview, I can only see my English page, whatever the locale in the URL.
In the back office, same problem.
Third step
So I refactor my index.liquid file to include the editable_elements in the header and make it match with index.fr.liquid and add drops in the body making references to the keys in the editable_elements section.
Here, in Wagon, everything is broken. Nothing appears in my columns.
In Engine, in the preview, same thing.
In the back-office however, in the textareas (where I can modify the editable elements), I can see the relevant texts that have been inserted in the header of the liquid files.
Fourth step
So I modify again my index.liquid file to insert in the drops a full path reference to the editable_elements.
Here, in Wagon, it works fine (everything is displayed properly).
In the Engine, in the preview, it works fine. In the back-office, the textareas are populated correctly.
However, the live editing is broken.
Am I missing something?
The text was updated successfully, but these errors were encountered: