cttree
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
This module provides the opportunity to order content types in parent-child relations. You can create a simple structure of content-types (like menu-links) calling /admin/structure/ctree.
Steps for configuration:
1. Enable the Auto Menu D7 Port Module ( I will commit this as a own project soon)
2. Enable the ContentTree Module
3. Goto /admin/structure/cttree and add enable checkbox 'Enable autochildnode creation'
4. Add some content-types by calling /admin/structure/cttree/add (you can add them several times considering some contraints explained later)
5. Build you structure
6. Ensure Auto-Menu settings have been configured correctly for all first level entries of you structures
7. Save configurations
8. Create new content of a first level element.
=> the complete structure will be created at once.
A simple (poorly conceived) example:
You got the content-types : 'store', 'articles', 'address', 'staff', 'shoes', 'pants', 'shirt'
You can create the structure with ContentTree module:
-store
--address
--staff
---address
--articles
---shoes
---pants
---shirts
Let's say you have a custom menu, too, called menu-stores. You have configured content-type 'store' as a auto-menu child for menu-stores before. If you now create a new 'store' all others content-types will be created and linked in the correct order and parent-child relation, too: one 'address' as child for the 'store', one 'staff' as a child of 'store', one 'address' as child for 'staff' a.s.o.
Additionally there's a possiblility to set a count for each level and content-type. This count will be used to create each level (an from there all sublevel) several times. According to the sample above ....
-store (1)
--address (1)
--staff (3)
---address (2)
--articles (1)
---shoes (10)
---pants (5)
---shirts (4)
.... these count settings would create 1 store, 1 address as child of store 3 times staff with two times address each, 1 articles, 10 shoes, 5 pants and 4 shirts - all with one click!
Additionally you can enable one more feature: Check 'Enable node validation' - but handle with care. This option will:
> disable the possiblity to create new nodes if they are not in the correct structure
>> if you still want to be able to create e.g. a new 'page' and you have checked this option, you have to add it on first level, too, otherwise a error message will appear...
> enable usage of max count setting
>> max count represents the maximum number of content-types that can be created manually.
>>> 0 = unlimeted creation allowed (the default)
>>> n = it can only be created once (e.g. setting 'address' max to 1 as child of 'store' implicates that you no longer can create additional addresses as child of stores if there's still one.)
This module depends on the Auto Menu D7-Port see #1138946: Auto Menu - D7 Port.
Addtional descriptions will follow if needed.
personal note:
This module contains a couple of small manageable and clear interfaces and classes. I tried (and hope managed as well) to prevent from unsightly code in one large php file - as is unfortunately a common practice in many other modules. But's it's a first draft - improvements will be done - suggestions are naturally welcome.
