I’m trying to use the entity-selector-dialog in my custom fields (A block field) but I can’t find the component. What do I have to import/extend in Angular to be able to use it? Should it exist in import { ... } from 'litium-ui';
??
Just adding the code from the docs:
<entity-selector-dialog
*ngIf="showDialog"
[entityType]="'page'"
[entityMultiSelect]="false"
(onSubmit)="submit($event)"
(onClose)="showDialog = false">
</entity-selector-dialog>
just result in an error asking if entity-selector-dialog is a component
I basically just want to open a page/category and/or file picker dialog. Do I need to use the iframe option? Or can this component be usable from a custom block field?
Litium version: 7.1
I still cant get the component to work, the problem with the https://localhost/Litium/UI/frame/EntityTreeSelectorWrapper iframe is that it dose not return the name of the selected page, is there a builtin anguler service that I can use to resolve the gui’id into a name?
Do you know what module it is contained in? Or the name of that API?
The API is [GET] /Litium/app/api/websites/page/{pageSystemId}
Think of that this is an internal api for the back office and can be changed without notice between two versions.
Could you share the idea of the custom field? Cause if you only need a reference to a page, or category, would it be better to use the Pointer Field? You can also use Pointer field in MultiField. Then you don’t need to create any custom component.
I can of course create the logic that way, but custom-fields are a fantastic way of making complex blocks less cluttered for the editors. So I really think/hope that you should keep supporting it.
Am guessing that the documentation is wrong or a bit outdated and that this simply can’t be done in the newer versions of Litium??
The easiest thing might be just switching to the iframe option? If so, then I have a
simple request:
Could you consider, sometimes time down the line to extend the iframe options to match the internal components? mainly:
-
Add a multiselect option to the pagetree selector.
-
Get a category selector, also with multiselect.
-
A bonus would be if the pagetree selector like the file selector also returned the entity name and url in the iframe event messaged.
I have now created internal api’s to fix these things so i’m no longer stuck, but a fix from your end would be much cleaner and nicer
Thanks
Glad to hear that you have found a workaround! We have identified the problem and bug has been created. We will soon release the fix.
2 Likes