Gossamer Forum
Home : Products : Links 2.0 : Customization :

Building extra templates!

Quote Reply
Building extra templates!
Before anyone grumbles at me...I have searched the forums with no luck!

I want nph-build to build other pages not related to Links 2.0, but other pages for my site. So...I added the new templates to site_html.pl.

An example name is sub site_html_mypage {

Then I went into nph-build and in the "build all" section I added:


# Create Mypage Page
$use_html ?
print qq|Building <A HREF="$build_root_url/mypage.html">MyPage</A> . . .\n| :
print qq|Building Mypage Page . . .\n|;
&build_mypage_page;
print "\tDone\n\n";



I then added a sub to the bottom of nph-build....


sub build_mypage_page {
# --------------------------------------------------------

open (MYPAGE, ">$build_root_path/mypage.html") or &cgierr ("unable to open mypage page: $build_root_path/mypage.html. Reason: $!")
print MYPAGE &site_html_mypage;
close MYPAGE;
print "\tClosing page.\n";
}


........this just doesn't work!

What am I doing wrong!

I either get sub site_html_mypage template printed in the body of my admin page, or it says that the server closed the connection before the task could be completed!

From Paul Wilson.
http://www.audio-grabber.com
On error resume next..
Subject Author Views Date
Thread Building extra templates! Paul 2071 Sep 20, 2000, 6:52 AM
Thread Re: Building extra templates!
gotze 2031 Sep 20, 2000, 10:58 AM
Thread Re: Building extra templates!
Paul 2002 Sep 21, 2000, 3:06 AM
Thread Re: Building extra templates!
sponge 1980 Sep 21, 2000, 7:27 AM
Post Re: Building extra templates!
Paul 1979 Sep 21, 2000, 8:29 AM
Post Re: Building extra templates!
sponge 2017 Sep 20, 2000, 12:35 PM