Gossamer Forum
Quote Reply
Templates for Plug-ins
I am having a little trouble conceptualizing how to make pages my plug-in generates template based.

At the moment my editor monitor plug-in automatically generates editor's profile pages. But it does this with my look at the moment, all the html being written right into the plugin.pm file.

This may sound a little dumb, but how can I turn this into a template based file creation of these pages?

For example, throughout these profile pages, I need to insert various values, like emails, names, categories and so on. I am hoping this does not mean parsing a html file and replacing tags!!?? Sounds a little complex.

Maybe someone could point me in the right direction with this.

ThanksSmile


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Templates for Plug-ins In reply to
print Links::SiteHTML::display('template_name', $tags);

So:

my $tags = { Foo => 'Bar' };

print Links::SiteHTML::display('template_name', $tags);

...means you would create a template and put it into the templates directory with <%Foo%> in it and "Bar" would appear.

You can use loop and function tags then as with any other template.

Last edited by:

Paul: May 28, 2002, 10:56 AM
Quote Reply
Re: [Paul] Templates for Plug-ins In reply to
ooo, that looks good. Thanks for that Paul!!Cool


http://www.iuni.com/...tware/web/index.html
Links Plugins
Post deleted by Ian In reply to

Last edited by:

Ian: May 31, 2002, 8:31 PM