-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ListPart shape bug or just my missuse #4749
Comments
I have some extra clue. My hierarchy looks like this: By the way: I guess same error is responsible for missing list of chapters in Admin when I edit Book content object. When I edit |
I have used ListPart's to nest content similarly to your heirachy, but mostly with Razor. This confuses me
Are you intending to load a particular content item based on it's alias and render it? |
@deanmarcussen exactly, and this content item contains ListPart of other objects. |
How are you loading the content item you want? |
No, by alias: |
When I access very same Book Content Item but by it's URL then ListPart with Chapters is loaded and everything works fine. |
Depending on the type of the template you are editing, |
@sebastienros I think you are right here my real use case is actually slightly diffrent (sorry for missing that):
|
Shapes still brings some confusion to me. I have
Book
content item that haveAliasPart
AutoroutePart
andListPart
ofBookChapters
then myContent-Book.liquid
shape have such line:{% assign book_chapters = Model.Content.ListPart.ContentItems | contet_of_type: "BookChapter" %}
When accesing Book by link thanks to
AutoroutePart
, shape for ListPart is generated, so ListPart is populated with BookChapters. Thats is correct.But in other place of my website I have such liquid code:
{{ Content["alias:my-book"] | shape_build_display | shape_render }}
This time book content itself is loaded, it also starts to render
Content-Book.liquid
shape, butListPart
is not populated withBookChapters
items. This suggest that in this second case ListPart shape is not properly constucted, so it is not loadindBookChapters
.Any thoughts on this?
The text was updated successfully, but these errors were encountered: