wn-blocks-plugin icon indicating copy to clipboard operation
wn-blocks-plugin copied to clipboard

Blocks in sudirectories

Open helmutkaufmann opened this issue 4 months ago • 2 comments

I have two blocks, one in the blocks directory of my theme called blocks/topop.block:

name: To top
description: Add a "to top" floater
icon: icon-file-image-o
tags: ["pages"]
==
<a href="" uk-totop></a>

As I would like to implement some sort of versioning of my blocks, I have added another block in blocks/V00/topop.block

name: DEPRECATED To top
description: Add a "to top" floater
icon: icon-file-image-o
tags: ["pages"]
==
<a href="" uk-totop></a>

The plugin finds the two blocks and lists them when I want to add them, however, both of them now list as DEPRECATED To top.

Was it actually foreseen to have subdirectories (at least I can have them in subdirectories as long as they do not have the same file name)? And if so, shouldn't I be able to have the same file system name for a block in the individual subdirectories? This would be very handy to implement a basic versioning of blocks.

If it is foreseen, it would be great if the list if blocks is grouped by subdirectory when displayed for selection. And if a default directory could be specified that lists all blocks in that directory at the top of the selection list.

helmutkaufmann avatar Aug 03 '25 06:08 helmutkaufmann

There was no plan to support subdirectories for blocks, that seems like it would get over complicated very quickly. Why do you want them in subdirectories? Why would you want multiple versions of blocks? That sounds like a nightmare for content managers.

LukeTowers avatar Aug 09 '25 03:08 LukeTowers

For maintaining versions.

helmutkaufmann avatar Sep 28 '25 10:09 helmutkaufmann