Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Debugging Local Templates...

Quote Reply
Debugging Local Templates...
For testing purposes I'm looking at writing a plugin/hack that dumps the final html output to a file...

I've looked at /admin/GT/Base.pm and /admin/GT/Template.pm and can't find where to dump the data...

If this would be better as a plugin where would be the best place for the hook?


moog
-- I've spent most of my money on beer and women... the rest I just wasted.
Quote Reply
bump... In reply to
To continue... It would be a useful feature to have the final html output saved to a file so a regular validator could be used to check the syntax...


moog
-- I've spent most of my money on beer and women... the rest I just wasted.
Quote Reply
Re: [moog] bump... In reply to
You ought to be able to login without cookies; the resulting URL should work with any validator that properly fetches pages from the web to validate. Alternatively, just using File -> Save As... from your browser should do the trick. Although I don't recommend it, the actual print() call in GT::Template is around line 111:

Code:
if ($print and $print == 1) { # parse_print
return print $self->_parse($template, $opt);
}

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] bump... In reply to
Thanks Jag, just what I was looking for...

Code:
if ($print and $print == 1) { # parse_print
my $LoadedHtml = $self->_parse($template, $opt);
open (OUT, ">/_check_html/html_out.htm");
print OUT $LoadedHtml;
close (OUT);
return print $LoadedHtml;
# return print $self->_parse($template, $opt);
}


I've managed to get W3C's validator running as a daemon checking the html_out.htm file every time it's updated...


moog
-- I've spent most of my money on beer and women... the rest I just wasted.