New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V8.7RC Label with custom expression #8689
Comments
Seems like a great idea to me! |
For reference Nested Content has this to get the name/label: |
Hi @bjarnef, We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know. For more information about issues and states, have a look at this blog post Thanks muchly, from your friendly Umbraco GitHub bot :-) |
@bjarnef you should be able to use angular expressions, but $index is not available, you can only choose values of your content properties(by their alias). If you think index is a missing option, I think it would be fairly simple to make that available as well. :-) |
@nielslyngsoe yes I think this is a missing option :) It would be great this is a bit consistent with Nested Content name template. See the link getName function in Nested Content 🙂 |
Additionally, @liquidkool is asking for the following feature:
|
Adding support to access both data/content and settings would mean the existing expressions need to change from I don't know what data the custom AngularJS views (for displaying previews within the back-office) have access to, but it would make a lot of sense to make the namings/models the same for the name template! |
The block label is generated in Where the config label is being interpolated here: However in Nested Content it pass in the index. Not sure if it is possible the generate the index without passing in the index or retrieve this index by the position of the item in the array. Furthermore in Nested Content when using |
@nielslyngsoe not sure if the |
@nielslyngsoe do you know if we can do something to pass in |
https://github.com/umbraco/Umbraco-CMS/blob/v8/8.7/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js#L108
I would say we need to do it this way to stay backward compatible, I hope this helps and give some inspiration for how we can solve this one :-) |
@nielslyngsoe I would change the name to |
@ronaldbarendse good point, I'm happy with that. Thanks for being aware :-) |
Fixed in #9275 |
With the new Block List we can use a custom expression for label, e.g. "Block {{myPropertyAlias}}".
However it would be great if we could use basic angular expression like we can in Nested Content, e.g. "Block {{$index + 1}}".
This expression seems just to render "Block 1" for all blocks.
The text was updated successfully, but these errors were encountered: