backdrop-contrib / mini_layouts

Provide blocks which allow positioning content within them in layouts.
GNU General Public License v2.0
7 stars 4 forks source link

Embedding the same mini-layout as a block within itself #48

Open herbdool opened 4 months ago

herbdool commented 4 months ago

I tried some tomfoolery and added the mini-layout I just created to itself as a block. I was expecting to create an infinite loop and crash my browser, but seems like it just doesn't render. So I guess that's good.

It would be even better if there was a way to prevent those blocks from showing up. Maybe it's a default context for mini-layouts that excludes them?

I kinda feel like I discussed this a couple years ago... but I couldn't find any specific issue around this.

docwilmot commented 4 months ago

Theres this: https://github.com/backdrop-contrib/mini_layouts/blob/975bd2fde71272ff587be80945899d9be8cac573/mini_layouts.module#L176

herbdool commented 4 months ago

Oh right. That rings a bell. I seem to recall too, that it wasn't going to be too simple to have those blocks not show up?

Another thing that just came to mind: what if two mini-layouts cross-reference each other? I may try that...