Results 1 to 5 of 5

Thread: [tree] Tree BE/FE Custom Data System (<= 2.9)

  1. #1
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default [tree] Tree BE/FE Custom Data System (<= 2.9)

    A while back I developed a really great BE/FE Custom Data system. I was inspired by the way that tl_module was extended and considered this as a way to store all data tables in Contao in a single table tl_tree. Of course I would only use it for situations where you need a custom dataset for a set of Publications, where you need some more, less or other fields than a simple News system.

    I called this system the Tree (tl_tree).

    Note that this version doesn't have a visual editor to create a new BE as it uses a standard Contao way to create fields and palettes in the BE, so that you still have to code that yourself (vs. Catalog system). However, I have included a Backend Sample (tree_publications) to show you how to "extend" the default palette set to provide a palette only for a set of fields, and there are a few custom fields added to create this palette "set". This palette then appears selectable in the Tree Archive when you configure the tree.

    The power of this system is however NOT in the BE design, but in the FE Module design.

    This is called Branches and Leaves (tl_branch and tl_leaf). Basically a Branch is either a "List", "Reader" or "Filter" and to that you can add many leaves. Each Leaf is really a FE Template rendered which takes it's input from a field and you can modify and render it visually with many parameters. The rendering system is extensible, which means you can add your own rendering sub-palette options for new datatypes in Contao using my code as a base. Once you have setup a module to display a branch, you never have to touch the Module, instead you come to the Branch and modify the leaves instead.

    This was a very interesting exercise to create a new way to do custom data in Contao and since the customer cool-down has now expired, I'm donating the code to you all.

    NOTE: This code is unsupported, however if you do get stuck I can help you out with some pointers. To get it working on 2.10+, you would have to copy/rename the TPL files to .xhtml and .html5. The code should be compatible, but I haven't tested it.

    Here is the download link. Remember to manually run install or update database after you copy in the files.
    http://www.thyon.com/files/content/lab/ ... e-v1.5.zip

    Screenshots of the Branch Section:

    All Branches
    [attachment=3:28f3r3ed]tree-branches.jpg[/attachment:28f3r3ed]

    Filter Branch
    [attachment=2:28f3r3ed]tree-branch-filter.jpg[/attachment:28f3r3ed]

    List Branch
    [attachment=1:28f3r3ed]tree-branch-list.jpg[/attachment:28f3r3ed]

    Reader Branch
    [attachment=0:28f3r3ed]tree-branch-reader.jpg[/attachment:28f3r3ed]

  2. #2
    New user
    Join Date
    07-15-09.
    Posts
    12

    Default Re: [tree] Tree BE/FE Custom Data System (<= 2.9)

    I'll give this a go!

    I'm surprised no one has responded to this.

    File is now located here now. for anyone else.
    http://www.thyon.com/files/content/l.../tree-v1.5.zip

  3. #3
    New user
    Join Date
    07-01-10.
    Location
    Midlands, UK
    Posts
    26

    Default Re: [tree] Tree BE/FE Custom Data System (<= 2.9)

    thyon, this looks excellent! I am just embarking on a business directory project and was hoping this would fit the bill!

    So, I've installed a fresh Contao 2.11.8 for the project, I'm running PHP 5.3 and I've run in to a few issues (some are definately PHP 5.3 related and some might not be). I was wondering if you'd done any more work on this before I start rolling up my sleeves!

    Thank you.

    p.s. I should point out that I have already renamed my template files.

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: [tree] Tree BE/FE Custom Data System (<= 2.9)

    This is unsupported code and I won't be developing it any further.

  5. #5
    New user
    Join Date
    07-01-10.
    Location
    Midlands, UK
    Posts
    26

    Default Re: [tree] Tree BE/FE Custom Data System (<= 2.9)

    Quote Originally Posted by thyon
    This is unsupported code and I won't be developing it any further.
    That's fine, just thought I would check before duplicating stuff here! :-)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •