Closed stpaultim closed 2 years ago
I was adding context last week, its a bit complex. Got distracted. Will push what I've got so far soon for testing.
@docwilmot looking for this too. Did you get around to getting this pushed?
Check out the new branch "contexts", will need some work.
Thanks @docwilmot
I'll see what I can come up with. I had some really weird issues at first, but I'm hoping a cache-clear has fixed them. I'll keep it posted.
Image fields don't seem to pull in through a "node" context. Everything else I've thrown at it (which isn't much) pulls in OK. I'm not sure if it's my setup or if image fields really are a problem.
Image fields don't seem to pull in through a "node" context.
Can youdescribe your steps please? Seems to work for me.
@docwilmot curious... I've always had problems wrapping my head around contexts... In this situation, if I use a context for a specific node ID, does it only pull the info from just that node or all nodes that are of the same type? This might be my issue where I'm pointing to a node that doesn't have an image, then viewing a node that does have an image but wasn't added as a context...
If this is how contexts work, I need to get a new issue going for relationships?
@docwilmot I got around to testing and yes, a context only pulls information from the node provided in the context. I realized after seeing how they work, that I never needed this type of granular functionality (I found more flexible methods) so I never needed to wrap my head around the concept of contexts.
Either relationships need to be added or maybe some sort of relationship to an entity type could be accomplished with visibility conditions which kinda seem to act like the relationships in D7?
Back to topic, Context from path does not save for me, regardless of what I enter for the path.
OK, hell of a task, but I think I've coaxed Layout to allow contexts and relationships on mini layouts. Test away please.
You're a rockstar 😉
I'll give it a go, hopefully in the next few days.
I had problems with the add context working, until I noticed the admin label was blanked out like it got reset.
After adding a label and saving, the following errors show up twice:
Notice: Undefined index: title in mini_layouts_admin_configure_validate() (line 432 of /modules/dev/mini_layouts/mini_layouts.admin.inc).
Oddly, it says the layout has been created on every save:
I realize now, this isn't related to context... if you want a new issue, let me know and I'll get one going.
Regarding the path context, it's looking / working great.
Core just needs to add in some "Selection Rules" to limit which fields are actually exposed through the context. Maybe someday.
Note your old mini layouts need to be deleted and cache cleared. I changed some stuff to do with titles.
This seems to be working in the current dev version. Closing this issue.
Will we be able to use field blocks or other contextual blocks in mini-layouts. If not, is that possible?