Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Adriano Fabri 469 posts 1633 karma points
    Mar 15, 2016 @ 14:52
    Adriano Fabri
    0

    Umbraco 7 - How to show a custom page in my custom section/tree?

    Hi, I'm trying to create a custom section, with a tree of two items. I've read some guides, and finally I managed to create my custom section and tree.

    Now...when I click on each tree item umbraco would to open an edit.html file, but I already have the two ascx page with all funtionalities.

    How can tell Umbraco to open my ascx page instead of .html files?

    Thank you Adriano

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 15, 2016 @ 15:44
    David Brendel
    0

    Hi Adriano,

    umbraco 7 uses angularis and HTML for most parts if the CMS backend.

    So you have to write your views in HTML and angular.

    Possible workaround would be an iframe in the HTML file which hosts your ascx

    Regards David

  • Adriano Fabri 469 posts 1633 karma points
    Mar 15, 2016 @ 16:19
    Adriano Fabri
    0

    Thank you for the support...I'm a newbie with angularjs.

    I also tried to open my custom html file but there is something of wrong.

    In my treecontroller I wrote:

    tree = new TreeNodeCollection {CreateTreeNode("delete_node", id, queryStrings, "DeleteNode", "icon-delete color-red", false, FormDataCollectionExtensions.GetValue<string>(queryStrings, "application") + StringExtensions.EnsureStartsWith(this.TreeAlias, '/') + "/delete_node")};
    

    The problem is that umbraco set as routePath: "~/umbraco/views/MyTree/deletenode.html" instead of "~AppPlugins/MySection/backoffice/MyTree/delete_node.html

    There is a way to tell Umbraco that all my custom files are in this last folder?

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 15, 2016 @ 16:27
    David Brendel
    0

    Hi Adriano,

    have you set these two attributes on your tree controller:

    [Tree("eventCalendar","ecTree","Calendar")]
    [PluginController("EventCalendar")]
    

    As the tree item seems to be created correctly. The only thing that I have are these two attributes.

    And then my urls are build like /App_Plugins/MySection/backoffice/ecTree/action.html

    Regards David

  • Adriano Fabri 469 posts 1633 karma points
    Mar 15, 2016 @ 16:39
    Adriano Fabri
    0

    Yes, I set all and my section and my tree render properly, but when I click on a tree item, umbraco search my custom action file here: "~/umbraco/views/MyTree/delete_node.html"

    I would instead to have all my custom action files in this folder: "~AppPlugins/MySection/backoffice/MyTree/"

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Mar 15, 2016 @ 18:23
    Dave Woestenborghs
    0

    Hi Adriano,

    I did a talk once on building custom sections with angular on the Umbraco UKFest.

    The code of that talk you can find here : https://bitbucket.org/dawoe/umbukfestival2014/

    There is also a video of the talk on Youtube : https://www.youtube.com/watch?v=_sX9eZSn9HI

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft