*
*
*
*
Register | Login 
Articles

Current Articles | Categories | Search | Syndication

Tuesday, May 29, 2007
How To Make an Empty Page Template
By dnnstuffadmin @ 4:28 AM :: 1639 Views :: 2 Comments :: :: DotNetNuke, How-To
 

One of the features that was introduced in DNN 3.2.0 (I believe) was the concept of page templates. This allows you to pick a page template when you are creating a new page and the new page will be initialized to the look and feel of the template. These templates exist in a folder called \Portals\_default\Templates and are named with a .page.template extension.

In a default install, there is a single page template named Default.page.template. This template is the one responsible for always adding a single text/html module onto your page with the title of 'Enter Title'. I may be in the minority here, but that has always been a sore spot for me because I'd rather just start with a clean slate. In fact I'm the same way with my browser and have my initial start page set to an empty page.

The nice thing is that it's rather easy to modify this template to produce a nice clean page without any extra modules loaded initially. All you have to do is edit this template with a standard text editor and rip out all the xml tags within the <description> tag so the template now looks like this.

<portal version="3.0">
  <description>Empty page template</description>
</portal>

Save it and now when you pick the default template in the Page Management you'll start with a clean slate.

If you want to keep the old template around before editing it, just make a copy of it and rename it something like SingleText.page.template and then when you create a new page that really does need an initial textbox, you can just select this template from the list instead.

 

 

Rating
Comments
By Phixate @ Saturday, December 29, 2007 2:56 PM
Very cool indeed! Many thanks!

Bythank @ Monday, April 07, 2008 5:02 AM
thank

Click here to post a comment

By Category

By Date

DotNetNuke Powered!

Copyright (c) 2005-2008 DNNStuff
*
Terms Of Use   Privacy Statement