Copied to clipboard

Flag this post as spam?

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


  • NightWolf 41 posts 44 karma points
    Jan 28, 2009 @ 02:56
    NightWolf
    0

    Custom Section Umbraco v4

    RE-POST: Forums seem to be playing up and I require urgent help with this problem please.

    I have created a contact form as a user control which inserts data into a database. The database content then needs to be loaded into a custom section of Umbraco V4.

    Below is the start of my c# code.

    [code]namespace FinancialServices.Umbraco.Extensibility
    {
    public class FormContactTreeLoader : ITree
    {[/code]


    The table in the database dbo.umbracoAppTree has two important fields treeHandlerAssembly and treeHandlerType. Below are the values I have in the table.

    [code]treeHandlerAssembly = FinancialServices.Umbraco.Extensibility
    treeHandlerType = FormContactTreeLoader[/code]


    The code inside the class is identical to that which is available here.

    When I go to my custom section the tree node Data is visible and then the first child node displays the following.

    [code]- data
    |--- Click to edit this item Error[/code]

  • Stephan Lonntorp 195 posts 212 karma points
    Jan 28, 2009 @ 08:01
    Stephan Lonntorp
    0

    I think you might have to compile this into an assembly called FinancialServices.Umbraco.Extensibility.dll

    try that and see if it works.

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Feb 04, 2009 @ 17:54
    Nik Wahlberg
    0

    I have the same exact problem. Any insight would be welcomed. Thanks.

    -- Nik

  • Ronnie Hegelund 48 posts 710 karma points
    Feb 04, 2009 @ 21:50
    Ronnie Hegelund
    0

    In umbraco 4 you need to inherit from BaseTree instead of ITree
    http://suite101.thefarmdigital.com.au/post/2008/11/Umbraco-Version-4--Tree-API.aspx
    so the code could look something like this

    [code]namespace FinancialServices.Umbraco.Extensibility
    {
    public class FormContactTreeLoader : BaseTree
    {

    public FormContactTreeLoader (string application) : base(application) { }

    public override void RenderJS(ref System.Text.StringBuilder Javascript)
    {
    Javascript.Append(@"
    function openContact(id) {
    parent.right.document.location.href = 'plugins/Contact/ContactManageMent.aspx?id=' + id;}");
    }

    public override void Render(ref XmlTree tree)
    {
    //Generate your tree
    }
    }
    }[/code]

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Feb 05, 2009 @ 00:59
    Nik Wahlberg
    0

    [quote=Ronnie]In umbraco 4 you need to inherit from BaseTree instead of ITree
    http://suite101.thefarmdigital.com.au/post/2008/11/Umbraco-Version-4--Tree-API.aspx
    so the code could look something like this

    [code]namespace FinancialServices.Umbraco.Extensibility
    {
    public class FormContactTreeLoader : BaseTree
    {

    public FormContactTreeLoader (string application) : base(application) { }

    public override void RenderJS(ref System.Text.StringBuilder Javascript)
    {
    Javascript.Append(@"
    function openContact(id) {
    parent.right.document.location.href = 'plugins/Contact/ContactManageMent.aspx?id=' + id;}");
    }

    public override void Render(ref XmlTree tree)
    {
    //Generate your tree
    }
    }
    }[/code][/quote]

    Ronnie, this is great!! What a huge help this has been. Thanks a ton! For those looking for a solution to this, see the Word document on the page from Ronnie's link above.

    -- Nik

  • Anders Burla 2560 posts 8256 karma points
    Feb 05, 2009 @ 16:51
    Anders Burla
    0

    This tree you can create your self, where will that be displayed in umbraco? Under the setting page or content, or can you even configure that?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Feb 06, 2009 @ 08:44
    Dirk De Grave
    0

    Hi,

    It's configurable through database tables umbracoAppTree.

    Regards,
    /Dirk

  • bhunt 18 posts 22 karma points
    Feb 22, 2009 @ 00:15
    bhunt
    0

    In case anyone else is looking for this, the link has changed and seems to be located at:

    http://suite101.thefarmdigital.com.au/2008/11/25/default.aspx

Please Sign in or register to post replies

Write your reply to:

Draft