|
From: shane <sh...@lo...> - 2001-09-27 11:47:42
|
At 06:01 PM 9/26/2001 -0500, you wrote:
>Hi,
>
>I'm trying to write a small plugin that will allow me to display some
>certain user configurable data on a new page.
>
>I'm doing some code troubleshooting, and I can't tell where the hook is
>made between my plugin filename, and the template that it will use. I
>initially installed the plugin, and now am trying to add a template for
>additional functionality. The plugin is called getprefs.pl. Inside the
>plugins/Getprefs/templates/ directory I have the data;getprefs;default
>template, main;getprefs;default template, and the new template called
>create;getprefs;default.
So your plugins are like this:
name page section
-----------------------------------------------
data getprefs default
main getprefs default
create getprefs default
>I have run the templates through tpage, and then entered the results into
>the Template editor from the Slash Admin page.
>
>I try to make this call in my getprefs.pl file:
>
>slashDisplay('create', {
> nickname => $nickname,
> test => $test,
> });
Well, when you do that, aren't you calling the template
name page section
-----------------------------------------------
create misc default
and *that* template doesn't exist.
>The output in my html source is :
>
><!-- start template: ID , create;; -->
>
>
>
><!-- end template: ID , create;; -->
>
notice that the output shows it's not finding the template.
For one of my plugins, when it calls a template, it shows the output as
<!-- start template: ID 126, bjplyrbankrupt;misc;default -->
the template is named: bjplyrbankrupt;misc;default
From my experiences, the *easiest* way to deal with templates is the
template-tool.
to load the template into the system:
template-tool -u bj -s bjplyrbankrupt;misc;default
to dump the template to a file to edit it:
template-tool -u bj -d -i 126
I recommend you use that to work with your templates.
Shane
|