I'm having troubles with understanding website template code, especially the posts collection
there is some hooks , that I don't understand what they do, and i don't understand why populateAuthors field is needed
my honest suggestion would be throw all the code into A.I and ask it to explain it to you, because it's actually really well built, almost self documented code. I found it easy to modify and enhance.
BUT that could be because I'm just more experienced.
yep, I'm beginner with not a lot of experience
I'm sorry, can you please help me
I don't get why this position in the default example doesn't work
Yeah, the sidebar position prop is meant for top-level fields, fields in a tab will not work here because the check for it is simple
If you move the categories to the top level of the collection, it'll work
check for it is simple?
didn't get this
The code that assigns fields to the sidebar doesn't move down the tree of fields, it only looks at top level fields
strange then, probably should be type warning or something, not sure it possible to implement
but this presence in the template confusing me
oh I see, thanks
not sure it possible to implement
Instead of nesting your categories field there, move it to the top level
Then it'll show up in your sidebar
no, I meant there should be type warning from payload
that it won't be visible
and there is no point to specify it then
if it not top level field
sir can you please help me
does my words make any sense?
Not really
I'm not following here
wdym
anyways
I have some problems with creating some model
could you please help me
I guess it won't take lot of time from you]
but as I begineer I'm struggling with some collection I need to create
there is no point to specify it then
If you want the field to show up in the sidebar it can't be nested within other fields, I'm not sure about type warning because that depends on if TS can actually evaluate how nested it is
could you please help me
For sure, go ahead and open a new thread here in community-help and tag me
yeah, from TS side it seems to be hard to implement
thanks a lot! I will tag you once, I will explain my problem there
Star
Discord
online
Get dedicated engineering support directly from the Payload team.