Copied to clipboard

Flag this post as spam?

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


  • Christoffer Andersen 23 posts 53 karma points
    Jan 27, 2010 @ 11:53
    Christoffer Andersen
    0

    Recreating section structure in custom section

    Greetings

     

    I am working on creating a newsletter plugin for umbraco. After adding a custom section and assigning a custom tree to that section, I get the custom tree repesented in the section, however it's represented as the only folder in the section and not as a subfolder of the section.

    To explain what I mean, if you navigate to the settings section, you will in a standard umbraco installation be presented with a folder called Section, which is open by default containing the folders Stylesheets, templates etc.

    If I however navigate to my new custom section I will only be presented with the table I created, in this case a table called template, and not a folder called the sections name containing the tables assosiated to is as in the settings section.

     

    I hope you understand what I am trying to achieve and if you have any ideas on how to solve this it would be most appreciated.

     

    With kind regards

    Christoffer Andersen

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Jan 27, 2010 @ 12:03
    Lee Kelleher
    0

    Hi Christoffer,

    From my understanding of your problem, it sounds like you need to register the (base) appTree for your custom section. Only registered appTrees will appear in the left-side-panel.

    So your new custom section is defined in the "umbracoApp" database table, and then in the "umbracoAppTree" table, you should have your base tree (for the section) and then any other appTrees that you want to use in that section.

    Hope that makes sense?

    Good luck, Lee.

  • Christoffer Andersen 23 posts 53 karma points
    Jan 27, 2010 @ 12:43
    Christoffer Andersen
    0

    Hi Lee

     

    I understand what your idea is, and I have tried to move down that path, however I can see it's not the approach the umbraco developers have taken. If I access my appTree table they have only registered the trees ex template, stylesheets etc. in the section folder, and no registration of the "base" tree as you are hinting towards.

    A good approach though :)

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 27, 2010 @ 13:00
    Dirk De Grave
    1

    Christoffer, 

    Have noticed the same, and that is by design, and you'll get an extra level as soon as you add an additional new app tree record (for testing, add yet another app tree record, use same assembly and type and you'll see that the custom section will add an extra level.

    It can be done without the second db entry, but you'll have to change your 'load' class to introduce the second level yourself, ie, in the Render() method, first create a top level node, make sure to set the Source property (using the TreeService) and you'll get another level. Render() method will be called again for that top level node (at that point, add the 'child' level nodes)

    If you need some sample code, I can share some tonight (mail me at dirk at netaddicts dot be)

    Oh, and for your information, we're working on an umbraco email service provider that will enable to send mail in bulk (A first release will be showcased at several #16feb meetings globally)

    Cheers,

    /Dirk

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Jan 27, 2010 @ 13:09
    Lee Kelleher
    0

    I know what you mean, I ran into the same problem a few weeks ago (for my yet to be released WordPress integration package), and adding the extra appTree was the answer.

    If you want to take a look at my code where I've added appTrees to existing sections, then there's Robots.txt Editor or User Controls Editor on CodePlex:

    http://umbracoext.codeplex.com/sourcecontrol/changeset/view/45140?projectName=umbracoext

    Good luck, Lee.

  • Christoffer Andersen 23 posts 53 karma points
    Jan 27, 2010 @ 13:29
    Christoffer Andersen
    0

    Cheers adding a new tree solved it ;)

    Oh and dirk the plugin I am constructing is a plugin from which to send newsletters to specific groups, based upon user defined newsletter templates. Perhaps I will be able to use some of the functionallity from your project when I get around mailing groups:).

Please Sign in or register to post replies

Write your reply to:

Draft