A way to index blocks in an area and of which type #18968
Replies: 2 comments
-
Not sure I understand what you need, but what about |
Beta Was this translation helpful? Give feedback.
-
I have renamed the topic to index blocks rather than count blocks as your example is a total count of blocks rather than an index. I have the indexing in the foreach loop in items.cshtml, I'm not sure where you can use Model.Blocks? To create an index I currently have something like: which as you say I can filter with something like: Which works fine in the front end but not in Block Preview for example. |
Beta Was this translation helpful? Give feedback.
-
I have recently created an indexing interface for a client where they can number blocks in various ways e.g. Figure 12, Section 3 etc…
I have achieved this by counting the blocks, all blocks and blocks by type.
It is an inelegant solution with various issues around passing the data to Block Preview for example.
This can be achieved with CSS and I am considering that route.
However, it would be very useful if that information was part of the Block Model.
Is that something that could be added easily?
Beta Was this translation helpful? Give feedback.
All reactions