Closed GinoPane closed 3 years ago
@HitArrowLegend this one is waiting for release, code changes are available on development branch
Ill check that when I wake up ! Can't wait to see it in action ❤️ much love to you
Out if curiosity before I start messing with it, can we sort posts by post type too?
I'm not so happy with the solution, I'd like to improve it, but I faced a couple of October bugs during implementation which did no allow to do what I want. Also available attribute types are a matter of discussion and feedback, I just added some for now but we can add more if needed.
Out if curiosity before I start messing with it, can we sort posts by post type too?
Sort in some component? Or backend list? Initial implementation does not include any of that (except probably backend post list, because I feel it is necessary to have type column there, but I haven't added it yet).
Updates to specific components are possible, but probably will be done as separated requests if required (or by pull requests if someone implements them).
Aside from the fact that I don't know yet how to access and display values stored inside type_attributes (guessing it has to do with for loop but i'm not sure how to use it if that's the case), backend wise, it's pretty much how I imagined it, and the option on the blog side is great too.
@HitArrowLegend Yes, I forgot to add it into the README, will do.
Actually, you can use typeField(code)
or typeFields()
methods on the Post model to get a specific field by its code (which is set when you create attributes for post types) or get all fields as an array.
In the template it looks like this:
<span>{{ post.typeField('rating') }}</span>
Method names are debatable. Maybe typeAttribute(s)
is more appropriate here. I can rename it as long as the feature is not released yet.
Amazing, thanks
Based on #85 suggestion, post types could be really useful by providing sets of additional properties to the Post model.