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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Page Template - How do I create one?Page Template - How do I create one?
Previous
 
Next
New Post
9/5/2006 6:11 PM
 

I am victim to the same page template search -- I spent the better part of two days looking for the feature. I read about it in the new features and was really excited. I am working on a small town website and wanted to use the page template to copy a page made for The Board Of Education for 25 more boards. So at least I know to stop looking.

Good news when you create a new page there is an option to copy from another page -- just pick the original page from the drop down list --  pick your modules--  pick new --and you have a copy of the original without having to add modules one by one.  

This worked for my problem.  

 
New Post
9/7/2006 3:37 AM
 

Ok.

But does this also take over all page settings (authorization) and all module settings?

Ill try and see if this works for us.

Thx.

 
New Post
9/8/2006 4:06 AM
 

Ok. I found the answers myself.

It seems the DB model is like this:

 Tab->TabModules->Modules->Modulesettings.

Note: A Tab is a Page.

Tabs

This table contains the actual pages.

Has one to many to TabModules, the panes on the page.

 

TabModules

Contains the panes on the page.

Has 1:n to Tabs (Every page can contain multiple panes)

Every pane has a 1:1 relation to a module.

 

Module

The table that holds the module instances of the module definitions.

 

Module Settings

Contains extra module settings of a module instance.

(Note: This is where copying fails. When copying pages in the process of creating new pages, the rows in the table is not copied also.

 

Now if you use "Add Page" on the basis of the copy page functionality, the ModuleSettings are not copied.

(I suggest in the new DotNetNuke release to add an extra "include modulesettings feature" on the AddPage view. Then every user has the freedom to decide whether or not to copy settings of modules also)

As a workaround, I created my own C# module.

In the basis I re-use the DotNetNuke object model, see code below.

Note the last boollean parameter in CopyTab. That does the trick, and also copies module settings.

            //Retrieve source tab/page back on id
            TabController   tabTC   = new TabController();
            TabInfo         ti      = tabTC.GetTab(iTabId);
           
            int iOldTabId = ti.TabID;

            //Set project name
            ti.TabName = txtNewProjectName.Text;

            //Create new empty tab
            int iNewTabId = tabTC.AddTab(ti, true);

            tabTC.CopyTab(ti.PortalID,
                            iOldTabId,
                            iNewTabId,
                            true);
            //now make sure the new tab has the proper new parent
            TabInfo tiNew = tabTC.GetTab(iNewTabId);
            int iNewParentId = Int32.Parse(cmbNewParent.SelectedValue);
            tiNew.ParentId = iNewParentId;
            tabTC.UpdateTab(tiNew);

(If I find out how to attach a zip to this blog, I'll add the module somehow later)

 
New Post
9/27/2006 3:50 PM
 

I found a file called default.page.template under DotNetNuke\Portals\_default\Templates.  I copied that to a new filename and followed the xml in the file to create my own template page.  Once i did that, i was able to see my page template on the new tab page.  It works very well.

 
New Post
10/9/2006 12:16 PM
 
We did this and it did not show up in the list. The name of the template HAS to have page.template in it. So if you template is named Services.template when you export it and modify the xml, rename it to Services.page.template and it will appear in the list.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Page Template - How do I create one?Page Template - How do I create one?


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