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 ForumsRepositoryRepositoryCustomize the dashboard TemplateCustomize the dashboard Template
Previous
 
Next
New Post
10/29/2008 2:19 PM
 

 

Hi guys,

Is it possible to customize the dashboard or create a new dashboard mode?

If so I would greatly appreciate a few starting hints. I am an inexperienced .Net developer but I have made my own Repository templates (based on the default template). I now want to have multiple dashboards for one repository, each one showing all the documents listed under a particular attribute (or at the very least a single category).

 

 

 
New Post
10/30/2008 8:41 AM
 

You can customize the various existing dashboard modes the same way you do for the main repository module. In the same template folder you will see html/cml file combos for each of the dashboard modes.

However, that will allow you to modify the look and feel and has support for a limited number of tokens ( see Admin guide on the Project downloads page )

If you want to add a new mode, or add some new functionality ( like filtering on an attribute ), you'll have to make code changes to do that. The file you'll have to change is RepositoryDashboard.vb.  See the pinned post in this forum for details on how to make and deploy code changes.

If you do make changes, feel free to send them to me for inclusion in any future releases.

 
New Post
10/30/2008 9:00 AM
 

Thanks very much Steve.

I will give it a go, and if I do make anything worth anything I will send it to you.

 

Cheers

 

Nick

 
New Post
10/30/2008 9:47 AM
 

Good luck Nick, if you have any questions, just ask

Here's a couple of tips ...

So, my understanding is that you want to be able to filter the items listed in the dashboard by either a specific category or a specific attribute value. In either case, what I suggest you do is add 2 new Module Settings for the Dashboard module. The first new setting to let you specify either ( ) Filter by Category or ( ) Filter by Attribute.  And the second setting allowing you to enter the value. So for example, you could select ( ) Filter by Category, then enter "Cars" in the Filter Value field instructing the Dashboard to only show items in the "Cars" category. Or, you could select ( ) Filter by Attribute and enter something like "Colors|Red" in the Value field telling the Dashboard to only show items that have "Red" as the value of the "Color" Attribute.  It would be a little more work, but you could use the Repository API's to use dropdown or listbox controls displaying the Categories and Attribute/Values so the admin doesn't have to type in the values, but simply pick them from a list. Take a look at the Repository Settings code to see how the category and attributes list controls are built and databound.  If you want to be able to filter on BOTH categories AND attributes make the filter by controls checkboxes, otherwise radio buttons or a dropdown list would work.

Once you have added those 2 new settings, you can then modify the RepositoryDashboard.ascx.vb file and change the DataBind() function. At the top of the function add some code to look at the 2 new settings, then modify the calls to GetRepositoryObjects() to pass the indicated category or attribute/value.

The GetRepositoryObjects method signature looks like this...

GetRepositoryObjects(ByVal ModuleId As Integer, 
                     ByVal sFilter As String, 
                     ByVal sSort As String, 
                     ByVal iApproved As Integer, 
                     ByVal iCategoryId As Integer, 
                     ByVal sAttributes As String, 
                     ByVal RowCount As Integer) As ArrayList

To filter on a specific category, pass the ItemID of the Category as the iCategoryId parameter. Passing a -1 means 'all categories'

To filter on a specific attribute or combination of attributes, pass a semi-colon delimited list of AttributeValue IDs in the sAttributes parameter. For example, "3;7;" will only return items that have attribute IDs of 3 or 7.  To select all records regardless of attributes, pass an empty string ( "" ) as sAttributes.

So, to recap, edit DashboardSettings.ascx.vb, add 2 new module settings, then edit RepositoryDashboard.ascx.vb, and in the DataBind() function, check the settings and then modify the calls to GetRepositoryObjects() to pass any indicated catgegory or attribute filters.

That should do it ... :) ... good luck!

 
New Post
12/15/2009 2:16 PM
 

Hello,

Has anyone tried this with a more recent version? 5+? I am trying to follow along and the first part of the instructions (editing Dashboard Settings.ascx.vb) makes sense, but I'm lost in what needs to happen with RepositoryDashboard.ascx.vb.

Nothing in either of these files match the GetRepositoryObjects method.

Is there anybody out there who could provide some tips?

 Thanks :]

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryCustomize the dashboard TemplateCustomize the dashboard 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