@@ -1,8 +1,18 @@
|
||||
|
||||
result = "<ul>";
|
||||
Umbraco = Object.const_get("umbraco")
|
||||
Library = Umbraco.const_get("library")
|
||||
NodeFactory = Umbraco.const_get("presentation").const_get("nodeFactory")
|
||||
|
||||
currentPage.Children.each do |this_item|
|
||||
result += "<li><a href='" + this_item.NiceUrl + "'>" + this_item.Name + "</a></li>"
|
||||
# Set the node id you would like to fetch pages from here
|
||||
# You can also set it as a macro property with the alias 'nodeId' instead
|
||||
|
||||
parent = NodeFactory::Node.new(System::Int32.Parse(nodeId))
|
||||
|
||||
|
||||
# Start writing out the list
|
||||
result = "<ul>"
|
||||
|
||||
parent.Children.each do |child|
|
||||
result += "<li><a href='" + Library.NiceUrl(child.Id) + "'>" + child.Name + "</a></li>"
|
||||
end
|
||||
|
||||
result += "</ul>"
|
||||
|
||||
Reference in New Issue
Block a user