New Plugin Specification: Treeview Element Plugin

marcelf

Member
Hi everyone,

I already have searched in the forum and internet about a plugin that show a hierarchy in fabrik, and I saw these topics below, but nothing simple or mature to use.

So, I wrote a specification that proposes two major improvements:

1. a new element called treeview: it uses in the form, a tree widget to select the categories, and you can use the joomla categories table or any table you want, just set the parent_id column.

2. a new design for List Interface: a treeview widget to filter the records. Also the plugin allows put all filters in a column on the left side, including the treeview. This makes fabrik search interface (List or View Data) more similar to ecommerce and digital libraries interfaces.

The complete treeview element plugin specification is here:
http://marcelferrante.com.br/fabrik/treeview/Specification-Fabrik-Treeview-Element-Plugin.pdf

All suggestions is appreciated. Any implementation tips?

Has anyone interest about this plugin? If I develop can I publish in the community to everyone download? How it works?

Thanks
--
Marcel Ferrante Silva
gtalk: marcelf@gmail.com
site: http://medialab.ufg.br/marcelf/en/

References:
http://fabrikar.com/forums/index.ph...d-sets-i-e-hierarchical-data-in-fabrik.38437/
http://www.fabrikar.com/forums/inde...ree-view-of-data-to-fabrik.18422/#post-100469
http://fabrikar.com/forums/index.php?threads/copy-element-to-group.10416/
https://www.br.freelancer.com/projects/php/fabrik-category-items-tree-view/
 
Last edited:
I think the "view switch" part is already possible:

You'll need to create your custom list templates e.g. div-cards, div-gallery, my-bootstrap.
You can display a Fabrik list with an alternate template by adding &layout=your-template to the URL.

So in each of your custom templates in default-buttons.php add the dropdown for the view switcher (see how it is done for CSV).
 
Looking at the spec, it wouldn't really be possible to publish this as a separate, self contained plugin, as it would require changes to the Fabrik core. It would have to be added to the main Fabrik repo.

Also ... just be aware that this will be a lot of work.

One question ... would you expect the new treeview to work in repeat groups? Or can we set a limitation on it that it'll only work in non-repeated groups? Anything to do with "multi select" (many to many) join elements (or elements extending the join element model) that involve many-to-many relationships are extremely difficult to get working in a repeat group context (where the element itself is already abstracted to a one-to-many table).

-- hugh
 
Hi Cheesegrits, about changes in the Fabrik core, which functionality at the spec specifically requires it ?
I didnt think about the impact of group, I will review this and return to you.
Thanks a lot,
Marcel
 
Hi Cheesegrits, about some changes will a honor if I could contribute to main repo.

"would you expect the new treeview to work in repeat groups? Or can we set a limitation on it that it'll only work in non-repeated groups? Anything to do with "multi select" (many to many) join elements (or elements extending the join element model) that involve many-to-many relationships are extremely difficult to get working in a repeat group context (where the element itself is already abstracted to a one-to-many table)."

About the question above, I have tried understand and used repeated groups and I came to a conclusion: it´s very similar to do a repeated group with databasejoin element > Render as checkbox or multi select drop down. The only difference is the widget will show a indented list or a tree instead a list (example in annexes). So if it already possible for databasejoin element, should be possible for treeview multiple values.

Example:

order (form)
customer (non-repeated group)
name (element)
email (element)
products (repeated group)
product name (element)
price (element)
categories (databasejoin or treeview element multiple values) with

categories (list, group and form)
title (element)
parent_id (element)

products_categoires (auxiliar table created automatically)
id
product_id
category_id
 
Yup, it's possible. I'm just letting you know that it's not easy, if you are having to re-write the query building methods rather than directly using the ones from the existing join element class you are extending. I haven't looked at this closely enough to figure out if you'd need to re-write those.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top