Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryUpgrading an existing repository to the new sub-category repositoryUpgrading an existing repository to the new sub-category repository
Previous
 
Next
New Post
6/10/2007 6:04 AM
 

I am struggling to add an existing category as a sub-category to a new head category, is this possible or do I have to start from scratch with a new repository with the correct sub-categories?

 

Regards

Richard

 
New Post
6/10/2007 9:14 AM
 

Hi Richard,
There is no built-in way to 'move' a category from one parent to another. For now, if you're comfortable with executing sql directly against your database, the only way to accomplish that is through a little sql executed via the host account.

NOTE: You'll be executing sql against your live database, so please take care and double-check your sql prior to executing it.

Sub-Categories were implemented by adding a 'Parent' field to the grrRepositoryCategories table. You can see all your categories by typing ( or copying and pasting from this post ) the following script into the Host->SQL box and clicking on 'Execute'

select * from grmrRepositoryCategories


you'll see something like this...

ItemId ModuleId Category ViewOrder Parent
1 372 All Videos 0 -1
2 372 Repository 99 -1
3 372 Project Tracker 99 -1
4 372 Installation 99 2
5 372 Configuration 99 2
6 372 Templates 99 2
7 372 Development 99 2
8 372 How to Use 99 3
9 376 ALL 0 -1
10 380 ALL 0 -1

A value of -1 indicates that that category is a 'root' category, otherwise it will be the ItemID of the Parent category. So, in the above example, if I wanted to move the 'Project Tracker' category, which is currently a 'root' category, to be a sub-category of 'Repository' which is also a root category, I would have to change the Parent of 'Project Tracker' (which has an ItemID of 3)  from -1 to the ItemID of 'Repository', which is '2'.

update grmRepositoryCategories set Parent=2 where ItemID=3

 That script will change the Parent of the category with an ItemID of 3 ( Project tracker ) to 2 ( the ItemID of Repository )

That's it. you've now moved an existing root category to be a sub-category of another root category.

PLEASE, PLEASE be careful with this though. If you have multiple repositories on multiple pages, you need to make sure you're looking at the proper 'ModuleID'. Also, double-check where you're moving the category to. Since you're directly manipulating the database, it would be easy to create a circular reference  that could bring your web site to it's knees :)

I will log an enhancement request into Gemini to provide more adminstrative control over categories, ie: move, copy, etc.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryUpgrading an existing repository to the new sub-category repositoryUpgrading an existing repository to the new sub-category repository


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out