And I added a data type in a children node of EN-US ... I created a plugin which get all localizations except current one, means: FR-FR, DE-DE, etc.
So, my logic is to get current node and get highest parent level which should be EN-US.
Then create an array with all contents (first-level content only) except EN-US and then add that array to $scope which will be done in HTML page where I make a list of checkboxes.
I tried something like this:
angular.module("umbraco")
.controller("LocalizationCheckboxEditorController",
function ($scope, appState, treeService) {
var pattern = /\/edit\/(\d+)/gi;
var regex = pattern.exec(location.href);
var nodeId = parseInt(regex[1]); // get node id from url
// below variable give me `Content`
var currentNode = appState.getTreeState("currentRootNode");
// below returns always null
var selectedNode = appState.getTreeState("selectedNode");
// returns error `No childNodesUrl property found on the tree node, cannot load child nodes`
var children = treeService.getChildren({ node: appState.getTreeState("currentRootNode") });
}
);
Want to create a datatype with predefined values got from Umbraco CMS nodes
Hi,
I want to create a data type with a list of checkboxes which values are got from Umbraco CMS nodes value based on a document type alias.
I started followed the tutorial from http://umbraco.github.io/Belle/#/tutorials/CreatingAPropertyEditor but I'm stuck on angular js and html part.
Can you advice me how to do that if is possible ? Or which way should I follow for my requirements ?
Hi Mihail,
can you give some more details? Or maybe a short example of what you are trying to achieve?
In that way we will have a better view and can we help you better to your goal.
/Michaël
I have the following content structure:
And I added a data type in a children node of
EN-US
... I created a plugin which get all localizations except current one, means:FR-FR
,DE-DE
, etc.So, my logic is to get current node and get highest parent level which should be
EN-US
.Then create an array with all contents (first-level content only) except
EN-US
and then add that array to$scope
which will be done in HTML page where I make a list of checkboxes.I tried something like this:
is working on a reply...