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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Way of editing lists with SQL at portal level?Way of editing lists with SQL at portal level?
Previous
 
Next
New Post
12/19/2007 7:35 PM
 

*bump* this has been unanswered for some time and I feel it will benefit a few people - can someone who has worked on the core Lists please comment?


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
12/20/2007 12:28 PM
 

Hi Rodney

There are a couple of ListController methods that manage Lists by the PortalID.

  • GetListInfoCollection(ByVal ListName As String, ByVal ParentKey As String, ByVal PortalID As Integer)
  • GetListInfo(ByVal ListName As String, ByVal ParentKey As String, ByVal PortalID As Integer)

There also is a Dataprovider method.

  • GetList(ByVal ListName As String, ByVal ParentKey As String, ByVal PortalID As Integer)

However, while there is no central List UI there is a control that you can use.

I would look at the Website\Admin\Lists\ListEntries.ascx User Control.  This UserControl contains the logic that is used on the right hand side of the Lists module as well as the Profile Property Editor (to set up List properties).  This Profile Property Editor can be found in Website\admin\Users\EditProfileDefinition.ascx, and shows how the ListEntries User Control can be used. 

Note: Profile Properties (of type List) are Portal based Lists so these UI components should model the behaviour you are looking for.

Hope this helps, and sorry for the delay in answering your question.


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
12/20/2007 9:26 PM
 

Hi Charles, thanks for the answer.

I still don't think that this helps though: The base problems is that there is no way to the the List ITEMS at portal level.

If we ignore the admin side of things (I will be using SQL to change the PortalIDs) - lets assume you had a module on 2 portals with the List name "SmartThinker_EventCategory" (this is my Events module). Each portal needs to have different Event Categories.

So currently, I use   listDataSource = listController.GetListEntryInfoCollection("SmartThinker_EventCategory"); which returns the list items for the list. Now I would expect this method to have an overload for the PortalID - the list names are the same, so the only distinguising ID would be that they are on different portals, but you can only get different top level list info objects by portal, not their items.

The other question (which may shed some light on whether I am trying to go about this the wrong way), is the end part of my initial post:

Should the Lists be stored with the same name like

ListA Portal 0
ListA Portal 1

or does it have to have a different name:

ListA Portal 0
ListB Portal 1

I am not going to implement any UI for the maintenance of the Lists, I am just going to run scripts that insert the same list name but with a different portalID (ie my top example). However the code methods do not support retrieving Items by PortalID, and the only stored proc that returns ITEMS is:

GetListEntries which takes in
    @ListName nvarchar(50),
    @ParentKey nvarchar(150)

this means it will get all the items for all lists called "SmartThinker_EventCategory" across all portals. I need to only get the items for the portal I want.


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
1/3/2008 6:49 PM
 

Hi Charles, I don't suppose you've had any more time to look at this?


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
1/4/2008 10:20 AM
 

ListName is Unique.

Therefore you need to use the second option.

 


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Way of editing lists with SQL at portal level?Way of editing lists with SQL at portal level?


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