Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I need to create a custom property editor, that lists certain document types in a checkboxlist, so a user can select these pages.
I started here:
http://umbraco.github.io/Belle/#/tutorials/CreatingAPropertyEditor
But how do i list the nodes, that i want to appear in the checkboxlist, i have no idea how to accomplish this.
Any ideas?
I propably need to create a
http://umbraco.github.io/Belle/#/tutorials/Add-ServerSide-Data
I have this so far. But cant see how to combine it with the loop in my html, see code below. person in people, what will that be?
namespace Ontranet.Categories{ [Umbraco.Web.Mvc.PluginController("Ontranet")] public class CategoriesApiController : UmbracoAuthorizedJsonController { public static IEnumerable<Node> GetAllNodesByType(int NodeId, string typeName) { List<Node> foundNodes = new List<Node>(); var node = new Node(NodeId); foreach (Node childNode in node.Children) { var child = childNode; if (child.NodeTypeAlias == typeName) { foundNodes.Add(child); } if (child.Children.Count > 0) GetAllNodesByType(ref foundNodes, child, typeName); } return foundNodes.ToList(); } private static void GetAllNodesByType(ref List<Node> foundNodes, Node node, string typeName) { foreach (Node childNode in node.Children) { var child = childNode; if (child.NodeTypeAlias == typeName) { foundNodes.Add(child); } if (child.Children.Count > 0) GetAllNodesByType(ref foundNodes, child, typeName); } } }}
Html :
<ul> <li ng-repeat="person in people"> <input type="checkbox" value="model.value = person.Name">{{person.Name}}</input> </li> </ul>
<ul> <li ng-repeat="person in people"> <input type="checkbox"
value="model.value = person.Name">{{person.Name}}
value="
model.value = person.Name">
model.value = person.Name"
{{person.Name}}
</input> </li> </ul>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Custom property editor, liste nodes
Hi,
I need to create a custom property editor, that lists certain document types in a checkboxlist, so a user can select these pages.
I started here:
http://umbraco.github.io/Belle/#/tutorials/CreatingAPropertyEditor
But how do i list the nodes, that i want to appear in the checkboxlist, i have no idea how to accomplish this.
Any ideas?
I propably need to create a
ApiController according to this tutorial:
http://umbraco.github.io/Belle/#/tutorials/Add-ServerSide-Data
I have this so far. But cant see how to combine it with the loop in my html, see code below. person in people, what will that be?
Html :
is working on a reply...