I have many custom content items for the Grid Editor and need a way to better organize and group them for the user. The window is cluddered and currently looks like this with more items on the way.
I would like to create something that looks like this:
I "THINK" it need to overide or replace itempicker.html, but I am not sure how that is done within the angularjs framework. The closest "how to" I have found so far is at....
I have started the work of creating my own custom Content Overlay and could use some advice.
I haven't been able to find a way to "overide" Ubraco's itempicker at \Umbraco\Views\common\overlays\itempicker\itempicker.html, and have replaced it with my own version. My concern is "my version" will be replaced with the next Umbraco update.
AngularJS issues - How to NOT show duplicate values in the Content Class(group) box. Angular also seems to ignore null or empty values causing the default content controls that come with umbraco to no longer show in the list.
How to resize the window? Umbaco seems to be doing this via code, thus canceling out anything done by css.
Package.manifest sample
{
"group": "Search",
"name": "Property Search Form with Location Lookup",
"alias": "SearchAnyProperty",
"view": "/App_Plugins/zpmControls/search/SearchAnyProperty.html",
"render": "/Views/Partials/MLS-Search/_SearchAnyProperty.cshtml",
"icon": "icon-search",
"config": {
"group": "search",
"remark": "General search form that can be used with most property types and location by a lookup."
}
},
The overlay now looks like the image below, but not without some "hacks" that I would like to make cleaner. My knowledge of Angular is Basic and I don't know how(or if it is possible) to override some functions. The issues I am now facing are:
How to load the Class List dynamically without duplicated values
How to "remember" the last class selected and reload it and its corresponding list the next time the overlay is opened
How to load the itempicker.html file from another location so it does not conflict with Umbraco's framework
I was looking for similar kind of solution and pointed me to this thread. Did you able to manage this to work? Is it possible to share more about how you achieve this?
I was not able to get everything to work in angular and had to do some backdoor coding to make it happen. Maybe an Angular expert can tell us how make these pieces function in a better way.
There were many pieces across Umbraco. If you do an update from Umbraco, these files will get overwritten, and you will have to go back and restore them. The Final version of it is included in the project that can be downloaded at: https://zBestPartners.com
FILE STRUCTURE
The core files for the Backoffice is at /App_Plugins/zpmControls
The matching front end part of the controls are at /Views/Partials/zpmControls
The modified item picker will get overwritten during an Umbraco Update: \Umbraco\Views\common\overlays\itempicker\itempicker.html
To get the Umbraco Controls to show up in the list, you will need to modify the file at \config\grid.editors.config.js. This file will also get overwritten during an umbraco update.
SAVING CONFIGURATIONS
The config settings are saved to a table in the Umbraco Database linked by the PageID or NodeId. The project uses a SQL Compact db since it's main data is provided by an external API.
Saving the settings happens upon selection, not when the "Save and Publish" button in pressed(one of the things I could not get to work.)
Control settings to the database are handled by /Controllers/zpmControlsController.cs The functions are called LoadSettings and UpdateSettings
The main javascript library needed for handling these functions is at: \Scripts\zpm\zpmLibrary.js
thanks so much two big items I had where customising the itempicker and then adding custom icons to that item picker for a better UI.
Ive managed to get both done now with your help so thanks so much.
For this entire expected output, it's better we use own custom AngularJs controller and custom item picker file with interceptor. I did a quick look into the project and did some update in the code. Below code shows how we can overwrite the itempicker.html without modifying the core file.
It is telling you that you can't log into umbraco's backoffice? or are you getting the message from one of the front pages? Trying to figure if it is a block on the API's in Azure.
Graham, Pasang just to ask the question I have a nested content type, its a slider on my homepage. Embed not as a grideditor but directly onto the page, this also uses the itempicker.html. Its not possible to add a config with a group to it. The dialog displays with nothing, any suggestions?
How to create custom itempicker.html
I have many custom content items for the Grid Editor and need a way to better organize and group them for the user. The window is cluddered and currently looks like this with more items on the way.
I would like to create something that looks like this:
I "THINK" it need to overide or replace itempicker.html, but I am not sure how that is done within the angularjs framework. The closest "how to" I have found so far is at....
https://our.umbraco.com/forum/developing-packages/92518-use-grid-rte-in-umb-overlay-with-working-link-selector#comment-303470
... but am having difficulity getting things to work. Any guidance would be appreciated. I am using Version 8.
Hi Graham,
Angularjs has something called httpinterceptor. With this you can basically point requests to different files.
Regards David
I have started the work of creating my own custom Content Overlay and could use some advice.
I haven't been able to find a way to "overide" Ubraco's itempicker at \Umbraco\Views\common\overlays\itempicker\itempicker.html, and have replaced it with my own version. My concern is "my version" will be replaced with the next Umbraco update.
AngularJS issues - How to NOT show duplicate values in the Content Class(group) box. Angular also seems to ignore null or empty values causing the default content controls that come with umbraco to no longer show in the list.
How to resize the window? Umbaco seems to be doing this via code, thus canceling out anything done by css.
Package.manifest sample
\Umbraco\Views\common\overlays\itempicker\itempicker.html
The window currently looks like this:
An Update for anyone following this thread
The overlay now looks like the image below, but not without some "hacks" that I would like to make cleaner. My knowledge of Angular is Basic and I don't know how(or if it is possible) to override some functions. The issues I am now facing are:
Any help with this would be appreciated.
Just following your threads and seem to be running into the same issues, how did you end up deduping the main list. Did you ever get the unique to work or did you get Alex's suggestion to work? https://our.umbraco.com/forum/using-umbraco-and-getting-started/100024-how-to-remove-duplates-in-ng-repeat.
Also how did you resize the overlay?
I've asked the question on the facebook forum on best way to implement this kind of functionality. https://www.facebook.com/groups/202933450108554
Hi Graham,
I was looking for similar kind of solution and pointed me to this thread. Did you able to manage this to work? Is it possible to share more about how you achieve this?
Thanks
Regards Pasang
Yes I got it to work. There are over 50 controls and you can see they work at: https://www.youtube.com/watch?v=vsU2l1pyufs
Hi Graham,
It looks really a great.
Thanks
Regards, Pasang
Thank you!
This is something I would like to try, just wondering Ive edited my grid.editors.config to all have group xxx i.e.
Should that then pick up automatically after editing the itempicker.html
Hi Iori,
As per Graham's post above, grid.editors.config should looks like below:
This way I am able to see the desired output.
Thanks
Regards, Pasang
Thanks sorry more coffee needed only saw the second one after :-)
Thanks
Lori and Pasang,
I was not able to get everything to work in angular and had to do some backdoor coding to make it happen. Maybe an Angular expert can tell us how make these pieces function in a better way.
There were many pieces across Umbraco. If you do an update from Umbraco, these files will get overwritten, and you will have to go back and restore them. The Final version of it is included in the project that can be downloaded at: https://zBestPartners.com
FILE STRUCTURE
The core files for the Backoffice is at /App_Plugins/zpmControls
The matching front end part of the controls are at /Views/Partials/zpmControls
The modified item picker will get overwritten during an Umbraco Update: \Umbraco\Views\common\overlays\itempicker\itempicker.html
To get the Umbraco Controls to show up in the list, you will need to modify the file at \config\grid.editors.config.js. This file will also get overwritten during an umbraco update.
SAVING CONFIGURATIONS
The config settings are saved to a table in the Umbraco Database linked by the PageID or NodeId. The project uses a SQL Compact db since it's main data is provided by an external API.
Saving the settings happens upon selection, not when the "Save and Publish" button in pressed(one of the things I could not get to work.)
Control settings to the database are handled by /Controllers/zpmControlsController.cs The functions are called LoadSettings and UpdateSettings
The main javascript library needed for handling these functions is at: \Scripts\zpm\zpmLibrary.js
thanks so much two big items I had where customising the itempicker and then adding custom icons to that item picker for a better UI. Ive managed to get both done now with your help so thanks so much.
Am in Ireland and it looks as though its locked down :-(
We could not log you in: You can't log in to this app or website because you do not meet the requirements for country, age or other criteria.
Hi Graham,
For this entire expected output, it's better we use own custom AngularJs controller and custom item picker file with interceptor. I did a quick look into the project and did some update in the code. Below code shows how we can overwrite the itempicker.html without modifying the core file.
After this we have to register interceptor as shown in below code.
After these steps you can have your own html and AngularJs controller files in app_plugins. I have shared my code here https://gist.github.com/pasangtamang/ec225024f9a614f82c233b2c6a8ce5c0. I hope this will help you to fix the problem
Thanks
Regards, Pasang
Pasang! Thank you! That is what I could not figure out how to do and it works beautifully!
How do we sort the Class list alphabetically?
Hi Graham,
Below code example sort the class names alphabetical ascending order.
Thanks
Regards, Pasang
E X C E L L E N T ! !
Thanks!
Lori,
It is telling you that you can't log into umbraco's backoffice? or are you getting the message from one of the front pages? Trying to figure if it is a block on the API's in Azure.
Hey its when I go to login via fb
Graham, Pasang just to ask the question I have a nested content type, its a slider on my homepage. Embed not as a grideditor but directly onto the page, this also uses the itempicker.html. Its not possible to add a config with a group to it. The dialog displays with nothing, any suggestions?
Hmmmmmmm.......
Try checking the file path and spelling in the package manifest file
Hi Iori,
To be honest I have not checked the code against nested content. I will check it and will share my findings.
Thanks
Regards, Pasang
Thanks guys any help would be great
Pasang and Lori,
Is the new window still working for you? I am now getting syntax errors on the arrow functions and don't know why?
Ignore my last email on this. Visual Studio was loading an older version of IE which does not support ES6.
Graham
is working on a reply...