Community Support for OpenDocMan (Deprecated)
Subfolders inside a category folder? - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html)
+--- Thread: Subfolders inside a category folder? (/thread-61.html)



Subfolders inside a category folder? - Stephen - 01-13-2010

jkmin
2008-06-05 16:31:29 PDT
I searched the forum on creating a sub folder inside the category folder but found none. The UDF would not work for this since the UDF sub folder or sub categories would be the same for all categories. I am looking for sub folders that would belong to a particular categories as if you are creating any subdirectories inside a directory in a file system. So, when adding a new file, the sub folder contents will depend on the selection of category.

Can this be done without much difficulty? I researched a little and found out that I would do the following for this.
1. the add, admin, detail, search result, and out PHP pages would need to be changed.
2. create a new table sub_category with the fields of id(primary key), sub_cat_name, and the category id it belongs.
3. alter the 'data' table to add the sub_category field.

I am thinking that changing the out.php could be complex since it needs to include sub folders or sub categories in each category if they exist.

I would really appreciate your comment.
Thank you.


jonathanwminer
2008-06-06 05:13:14 PDT
Hi -

This definitely is a feature that needs to be implemented to really make an impact in the quality and usefulness of OpenDocMan.

This also impacts the "Tree View" mode, which would have to be enhanced to handle multiple layers. The ideal solution would be to define a new UDF type, like a "nested pick list". Then the pre-defined "Category" field could be removed from ODM, and users that need it could implement it using the new UDF. You would also need to address how to implement "Tree View" if there are multiple nested pick lists defined.

jonathanwminer
2008-06-06 06:04:57 PDT
One work around would be to name your Categories like this:

Category1:Sub1
Category1:Sub2
Category1:Sub3

Category2:Sub1
Category2:Sub3
Category2:Sub4

Category3:Sub2
Category3:Sub4

I tested this really briefly this morning, and I think this accomplishes what you want, with no changes to the existing ODM codebase.


jkmin
2008-06-06 11:55:45 PDT
Thank you for your comment.
Yes, I am using the Tree view mode, and I think it would not be easy to add a level of directory inside the category. Maybe it could be easy. For now, I am focusing on only one level sub directory, not multiple level. If it is more than one level of sub directory, it would become very complex. If you can make it, the user defined nested pick list would be great.

For your 2nd post, I still think it is not what I want. The sub folder or categories would show for all top level categories. And somehow, While I was testing UDF, when I added more than one UDF field, only the first UDF field that I added showed up. I think I have to look into what is happening in my system.

I will study the out.php to see how I can add the sub directory in tree view mode.

I really appreciate your comment.

Thank you.


jonathanwminer
2008-06-06 12:02:13 PDT
For your UDF problems, check the Patches forum and make sure that you have installed any updates that are specific to UDFs.
jkmin


2008-06-06 15:02:25 PDT
Thank you. I applied the UDF patch, and all the UDF shows up on the Admin User Defined
Fields column. But then, still, all the UDF select drop down options show up for all the categories on the Add document page.

I am thinking about adding a new column called 'sub folder' between the 'categories' and 'file operations' column for Add Delete Update Display of the sub folder. And then on the 'Sub Folder' admin page, the 'Category' select drop down will be placed at the top to select for the 'sub folder' to belong to in creating a new sub folder. And, that way, when you add a new document, depending on the category selected, the sub folder options will be different based on what you defined on the admin sub folder page. The blank sub folder can be an option also to all categories, so that documents with the blank sub folder is not located in any sub folder, but directly placed inside the category. It is as if in a file system, a directory contains files directly and also sub directories.

I really appreciate your comment.

Thank you.


jkmin
2008-06-06 15:19:11 PDT
Since I am not quite familiar with the 'Smarty' template and the OO PHP concept, the out.php page would be the most difficult part for this change. I am just adding 1 level sub folder, not multiple level. If adding the multiple level sub folders can be automated, it would be really useful and great.

I really appreciate your comment.

Thank you.