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

How to add custom tile programatically through the layout editor. #461

Open
evansavage opened this issue Feb 21, 2020 · 0 comments
Open

Comments

@evansavage
Copy link

evansavage commented Feb 21, 2020

In this scenario, I have a mosaic template that I would like to render the same way for each new event page that is created for my Plone site. I have had success with injecting attributes of the event into the template via the /@@layouts-editor interface, but I am having a lot of trouble with adding a custom tile to the template programatically.

Below I included the code under consideration, and I seem to have many of the attributes correctly filled in for "data-tiledata," though this error is thrown every time in the terminal:

KeyError: 'Please traverse to @@edit-tile/tilename/id'

I am convinced this has something to do with the "uid" key in the "data-tiledata" attribute., based on the error above, and when I create a new event, I am unable to open the form that is usually completed for collection tiles.

Am I not referencing a collection the correct way? Is there some syntax I can use for the UID injection that is dynamic and not hard-coded explicitly to an alpha-numeric ID?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant