Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Display different template set

Quote Reply
Display different template set
Please can someone tell me how to make this display a template from a different template set?

print Links::SiteHTML::display('page', {%$hash});

Thanks, Laura.
Quote Reply
Re: [afinlr] Display different template set In reply to
This should work:
Code:
$IN->param(t => 'desired_template_set');
print Links::SiteHTML::display('page', $hashref);

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Display different template set In reply to
Perfect. Thanks.
Quote Reply
Re: [afinlr] Display different template set In reply to
Just a note on {%$hash} ...

$hash is a hash reference. By using %$hash you are dereferencing it, so it essentially becomes a normal hash, for example.. %hash. By using { } you are then creating an anonymous hashref...so:

{ %$hash }

...is dereferencing a hashref and the referencing it again, which is the same as:

\%hash

...but as you already have your reference ($hash) then you don't need to do anything, just pass in $hash as in Yogi's example.

Hope that makes sense Crazy

Last edited by:

Paul: May 18, 2003, 2:23 PM
Quote Reply
Re: [Paul] Display different template set In reply to
Hmm, that's the second time you've caught me doing that!

I think I'm just too lazy to be a good programmer - once I've found something that works I'll use it. That probably explains why I'm having so much trouble with my server spiralling out of control all the time!
Quote Reply
Re: [afinlr] Display different template set In reply to
Quote:
That probably explains why I'm having so much trouble with my server spiralling out of control all the time!

That's more likely to be down to the my_users sub-routine Wink
Quote Reply
Re: [Paul] Display different template set In reply to
I don't think so.

I seem to have quite a few cgi applications that wont run under mod_perl so I'm running them on my frontend server. Do you think this is a problem? It does seem to be the frontend that is having the problems rather than mod_perl - at least as far as I can see.
Quote Reply
Re: [afinlr] Display different template set In reply to
I'm not sure. It could be the cause. Are the scripts just overloading the server in general or is it specific functions/pages?

If the scripts have:

use strict;

...at the top you can *generally* trust them.