Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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 ForumsRepositoryRepositoryHow to avoid 1st Category to be ticked on upload How to avoid 1st Category to be ticked on upload
Previous
 
Next
New Post
8/8/2007 4:38 AM
 

Hi,

I am using the repository module and developping skins. I have an issue with Categories.

It seems that by default the first category is ticked for all upload. I want to remove that.

I need discrete categories ( one upload belong to one category and only one).

I tried to use the Select setting of the [CATEGORIES] token in the form.xml and set value to SINGLE. This work for [ATTRIBUTES] but not for categories.

Do you have any idea where I am wrong and how to avoid the system to select 1st category in the list by default.

Thanks for your help.


Bruno Généré
 
New Post
8/9/2007 4:43 PM
 

The problem is that categories are 'required' since there is a 'join' when retrieving items from the Repository data table and the Categories table. Therefore, if a Repository item is not associated with at least one category it will never be retrieved from the database and you will never see it. With that design limitation in mind, I added code to make sure that you could not save a Repository item that was not associated with at least one category.

The logic goes like this..

When saving...
1. count the 'number' of categories that the item is associated with
2. if the count is 0, then automatically assign the item to the first available category.

I know it's not an idea situation, and it stems from the fact that the Repository module's 'All' filter is not truly an 'All' filter. By default when you place a new Repository module on a page, I automatically create a category to go along with it and name it 'All files'. So, when you select 'All' from a dashboard or header combo box you're not really viewing All items, you're viewing all of the items assigned to the 'All files' category.

Sorry this does not solve your problem, but hopefully understanding exactly how it works and why it works that way may enable you to figure out a workaround. I know this won't help  :)  but I do plan to redesign how categories work in the next major release (4.0)

 
New Post
8/10/2007 2:59 AM
 

Hi Fabian,

Thanks for the answer.

First, just want to say that the repository module is fantastic to store content without setting a 1000 pages web site. I plan to use it extensively. The skining is really a very good point and a lot of features are very nice. I am going into the details to understand how to use it without changing the code.

So going back to categories, I understand your point and how it works. However the issue is that even if I tick one or more categories in the form, the system always assign the item to the first available category, so it seems that the count = 0 test is not done in the proper way ( is it a bug ?).

Also I find out that to get the categories as a single choice ( Radio button) in the form, you need to create the token [Categories] (using lower cases) with Select value to SINGLE. ( Is there also a bug as the same setting for [CATEGORIES] does not work).

Also there is a lot of XML settings which are not documented like Default on SUMMARY and DESCRIPTION, Required on FILE and URL. As I am going to use this extensively, I could review and fix the documentation (Repository Module User's Guide) if you are interested. The document is really good but I could update Appendix A with my findings and some of the remarks done on this forum.

I am out the office for 2 weeks but just ask me around August 27th and I can do it for you.

Regards

 


Bruno Généré
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryHow to avoid 1st Category to be ticked on upload How to avoid 1st Category to be ticked on upload


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