-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Make it possible to replace content items with an unknown ID using recipes #16070
Comments
What about other scenarios like locating an item by a serial number or some other unique identifier? I have not gave this much of a thought, but what if we add a new LocatingAsync event on the content manager so that we can locate an item using other identifiers like alias, serial number, and anything else we have a handler for? |
We could generalize it to use
I.e., exactly what the Menu TagHelper does too. |
|
Or |
Is your feature request related to a problem? Please describe.
Copied from Lombiq/Helpful-Libraries#199 by @sarahelsaig.
Currently it's not possible to overwrite a content item with a recipe if its ContentItemId is unknown - for example if it was created from a recipe using
"ContentItemId": "[js: uuid()]"
. We should include some recipe mechanism to get around this.E.g.
TestAddingMenuItemToBlogMainMenuAsync()
in Lombiq Base Theme would benefit from this.Describe the solution you'd like
IGlobalMethodProvider
that let's you find the ContentItemId from alias, e.g."ContentItemId": "[js: idFromAlias('main-menu')]"
.I'm not sure if either of these is possible during setup, if the alias index may not be populated yet?
Describe alternatives you've considered
Implementing the same thing in a custom module.
The text was updated successfully, but these errors were encountered: