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!