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 ForumsRepositoryRepositorySuggest A Link Template?Suggest A Link Template?
Previous
 
Next
New Post
1/5/2007 2:05 PM
 

Thanks for taking the close look.  I was just duplicating the error with the Nifty Toggle template and was going to post about it.  I'll look for the code updates.  Thanks.

And while you're posting code, has any headway been made with the Subcategories enhancement to the Repository.  I've seen a few threads by persons that had implemented this feature on their own, and tempting as it is to make a custom modification to the current version, I've avoided code changes that will leave me off on a tangent when the next version of the Repository is made available since I understand Subcategories is a definite in the next release.  So if the code for the Subcategory feature has already been written, any chance of seeing it?  Testing it?

 
New Post
1/9/2007 3:14 PM
 
Have we made any headway on these fixes yet?
 
New Post
1/23/2007 11:06 AM
 

Ok, here is the first fix which will solve the problem of the form using the header.xml file for object settings

Form.ascx.vb, line 457

LINE 457
Change: Dim controlType As String = oRepositoryBusinessController.GetSkinAttribute(xmlHeaderDoc, "Categories", "Select", "MULTIPLE")
To: Dim controlType As String = oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "Categories", "Select", "MULTIPLE")

LINE 527
Change: Dim controlType As String = oRepositoryBusinessController.GetSkinAttribute(xmlHeaderDoc, "ATTRIBUTES", "Select", "MULTIPLE")
To: Dim controlType As String = oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "ATTRIBUTES", "Select", "MULTIPLE")

LINE 529
Change: controlType = oRepositoryBusinessController.GetSkinAttribute(xmlHeaderDoc, "ATTRIBUTE:" & attribute.AttributeName, "Select", controlType)
To: controlType = oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "ATTRIBUTE:" & attribute.AttributeName, "Select", controlType)

I'll post the fix for using radio buttons for categories and attributes later today or tonight

 
New Post
1/23/2007 2:41 PM
 

... and here's the coding fix for allowing you to set Categories and Attributes to radionbuttons (SINGLE) or checkboxes (MULTPLE) in the form.xml file

Form.ascx.vb

Find the code beginning around line 697 in the btnUpload_Click() function.. you will see the code to handle the categories and attributes, change the code to look like this...

                strCategories = ";"
                Dim categories As New RepositoryCategoryController
                Dim category As RepositoryCategoryInfo
                Dim objItem As ListItem
                Dim objCBL As CheckBoxList
                Dim objRBL As RadioButtonList

                ' get selection type for the Categories
                Dim controlType As String = oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "Categories", "Select", "MULTIPLE")
                If controlType = "SINGLE" Then
                    objRBL = PlaceHolder.FindControl("__Categories")
                    If Not objRBL Is Nothing Then
                        Dim item As ListItem
                        For Each item In objRBL.Items
                            If item.Selected Then
                                strCategories += item.Value & ";"
                            End If
                        Next item
                    End If
                Else
                    objCBL = PlaceHolder.FindControl("__Categories")
                    If Not objCBL Is Nothing Then
                        Dim item As ListItem
                        For Each item In objCBL.Items
                            If item.Selected Then
                                strCategories += item.Value & ";"
                            End If
                        Next item
                    End If
                End If
                If strCategories.Length = 1 Then
                    ' every item must be associated with the ALL category
                    Dim Arr As ArrayList = categories.GetRepositoryCategories(ModuleId)
                    category = CType(Arr.Item(0), RepositoryCategoryInfo)
                    strCategories += (category.ItemId & ";")
                End If

                strAttributes = ";"
                Dim attributes As New RepositoryAttributesController
                Dim attribute As RepositoryAttributesInfo
                Dim attributeValues As New RepositoryAttributeValuesController
                Dim attributeValue As RepositoryAttributeValuesInfo

                ' get selection type for the ATTRIBUTE
                controlType = oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "ATTRIBUTES", "Select", "MULTIPLE")
                If attributes.GetRepositoryAttributes(ModuleId).Count > 0 Then
                    For Each attribute In attributes.GetRepositoryAttributes(ModuleId)
                        controlType = oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "ATTRIBUTE:" & attribute.AttributeName, "Select", controlType)
                        If controlType = "SINGLE" Then
                            objRBL = PlaceHolder.FindControl("__Attribute_" & attribute.ItemID.ToString())
                            If Not objRBL Is Nothing Then
                                For Each objItem In objRBL.Items
                                    If objItem.Selected = True Then
                                        strAttributes += objItem.Value & ";"
                                    End If
                                Next
                            End If
                        Else
                            objCBL = PlaceHolder.FindControl("__Attribute_" & attribute.ItemID.ToString())
                            If Not objCBL Is Nothing Then
                                For Each objItem In objCBL.Items
                                    If objItem.Selected = True Then
                                        strAttributes += objItem.Value & ";"
                                    End If
                                Next
                            End If
                        End If
                    Next
                End If

 

That should do it. it will now look at the 'Select' property for [Categories] and [ATTRIBUTES] ( default for all attributes ) or [ATTRIBUTE:AttributeName] for a specific attribute to render radiobuttons (SINGLE) or checkboxes (MULTIPLE) and save the data accordingly.

Just a note: both of these fixes have been tested and checked into the Vault so they will be part of the February Repository patch release. So if you make the code changes yourself now, you should not have to worry about updating when the next release comes out.

 
New Post
1/23/2007 10:19 PM
 
Thanks Steve.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositorySuggest A Link Template?Suggest A Link Template?


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