Creating a Custom Template
By Paul
3.4/5 based on 5 votes. The median rating is 4.
By Paul
If you wish to add custom templates, this is a simple process. You can make an existing WSN Links page use a template other than the normal one, or you can add a new page which will use the WSN Links header and footer but will be otherwise new content.
At Admin Panel -> Templates -> Manage Templates, simply type a file name (like 'mytemplate') in the box for creating a new template. (Alternatively you can upload a blank file with the extension.tpl to your template directory's custom subdirectory.) It will automatically appear in the selector so you can select to edit it.
Use your new template anywhere by adding &custom=yes&TID=custom-yourtemplatefilename to the URL of a page. For a new template where the file is called example.tpl, for example, you might use http://yourinstallpath/index.php?custom=yes&TID=c...
If you want a specific category to have a unique template, just edit that category and fill in the template name in the 'custom template' field.
If for whatever reason you don't want the header and footer to show around your custom template, use &usewrapper=no at the end of your URL.
Advanced:
Suppose you'd like your custom page to have a nicer, shorter URL... you want it to be http://yoursite.com/articles/mypage.html instead of http://yoursite.com/articles/index.php?custom=yes&TID=custom-example. The easy way to do this is with URL rewriting, at Admin -> Settings -> SEO, using the rewriting individual URLs option.
On Windows IIS rewriting isn't available though, so you can fall back to opening notepad and typing this:
<?php
$custom = 'yes';
$TID = 'custom-example';
require 'index.php';
?>
Of course, change 'example' to the name of your template. Then save this file as mypage.php and upload it to your articles directory.
To use WSN templates outside of the directory where you have WSN installed, see http://www.webmastersite.net/forums/comments.php?...
At Admin Panel -> Templates -> Manage Templates, simply type a file name (like 'mytemplate') in the box for creating a new template. (Alternatively you can upload a blank file with the extension.tpl to your template directory's custom subdirectory.) It will automatically appear in the selector so you can select to edit it.
Use your new template anywhere by adding &custom=yes&TID=custom-yourtemplatefilename to the URL of a page. For a new template where the file is called example.tpl, for example, you might use http://yourinstallpath/index.php?custom=yes&TID=c...
If you want a specific category to have a unique template, just edit that category and fill in the template name in the 'custom template' field.
If for whatever reason you don't want the header and footer to show around your custom template, use &usewrapper=no at the end of your URL.
Advanced:
Suppose you'd like your custom page to have a nicer, shorter URL... you want it to be http://yoursite.com/articles/mypage.html instead of http://yoursite.com/articles/index.php?custom=yes&TID=custom-example. The easy way to do this is with URL rewriting, at Admin -> Settings -> SEO, using the rewriting individual URLs option.
On Windows IIS rewriting isn't available though, so you can fall back to opening notepad and typing this:
<?php
$custom = 'yes';
$TID = 'custom-example';
require 'index.php';
?>
Of course, change 'example' to the name of your template. Then save this file as mypage.php and upload it to your articles directory.
To use WSN templates outside of the directory where you have WSN installed, see http://www.webmastersite.net/forums/comments.php?...
Rating:
3.4/5 based on 5 votes. The median rating is 4.
Submitted: 09/25/03 (Edited 10/30/07)
Description: Adding new tempaltes to accomplish new tasks.
Views:
2519 views. Averaging 1 per day.
In the most recent 30 day period, there've been 0 views.

Print
E-Mail