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...Manually adding pages to a portal.Manually adding pages to a portal.
Previous
 
Next
New Post
9/29/2008 1:56 PM
 

Hi all frends!

I am developing a program to port all my small sites over to portals in the DNN enviroment.

I will make Tabs of all my Categories and Articles, and display them in a hierarchical Page layout.

I have a solution that almost work, but I guess it is very fragile. I add data to the tables manually with LINQ, and maybe this is not so smart, if the layout in Tabs or other related tables alter, due to upgrades, my system will fail.

And I have a problem. When I add all the pages to the site, and all the relations. There is a weird layout of the pages. It seems like the TabOrder is interfering with the Parent-Child relationship. If I have three tabs with TabOrder 1, 2, 3 and all these have childs with the same TabOrder, the pages will not display properly. It seems like I have to have some sort of unique TabOrder for each level?

This made me think, maybe it is better to add the Tabs trough method calls from DotNetNuke.dll? Is this possible? Can I register the dll, and use it inside my project to add the pages? And if I can, what is the method calls, or where can I find some documentation on this?

 

Hope some of you out there understand my question. And maybe I'll see you on OpenForce.

Best regards
Vidar Markussen

 

 
New Post
9/29/2008 7:12 PM
 

Vidmar, I'd recommend that you use API methods rather than direct sql or linq inserts, as it will ensure that you correctly enter data and preserve referential integrity. You'll need to take a look at the tabinfo object and various properties such as level, title etc. http://kemmis.info/blog/archive/2007/11/07/programmatically-creating-dotnetnuke-pages.aspx is a good example.

You can use dotnetnuke.dll outside dotnetnuke, but it relies on httpcontext so it needs to be ran in a website - you may find it easier to create a simple dotnetnuke module and either provide it with a list of url's and their relations or else build in a spider.

Cathal

 


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/30/2008 3:37 AM
 

Thanks Cathal.

That really helped!

 

BTW, is there a way to add pages using transactions? I need to be sure all my pages are added, or no pages should be added.

 

Rgs
Vidar

 
New Post
9/30/2008 1:31 PM
 

Vidmar,

The underlying DAL calls issued by the API does not support transactions natively, but you can wrap your code in a transaction via the sytem.transaction namespace. I'd suggest a block level transaction via TransactionScope would be good, it's lightweight and easy to write (http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx)

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
10/1/2008 7:23 AM
 

Hi Cathal.

Thanks. Will do that.

 

-vidar-

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Manually adding pages to a portal.Manually adding pages to a portal.


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