Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Transfert forum vars to a custom page

Quote Reply
Transfert forum vars to a custom page
Hi,

How can I transfert throw forum_view.html all the forum vars to a custom page (template)? I tried to put "forum=<%forum_id%>" in the URL, but it doesn't work.

Thank you!

François
Quote Reply
Re: [Franco] Transfert forum vars to a custom page In reply to
There is a function you can call in the template, <%GForum::Forum::get($forum_id)%> which will return all of the variables for a particular forum.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Transfert forum vars to a custom page In reply to
Thank you, Jason. But I'm missing something.

Here what I done:

- I put this link in forum_view.html: <a href="gforum.cgi?do=regles_forum;forum=<%forum_id%>;<%hidden_query%>">Règles du forum</a>

- I put <%GForum::Forum::get($forum_id)%> in my custom template "regles_forum.html"

But the forum vars are not transfered to "regles_forum.html". What I'm doing wrong?

Thank you!

François
Quote Reply
Re: [Franco] Transfert forum vars to a custom page In reply to
Hi François,

I think you will need to use a global here:

sub {
my $fid = $IN->param('forum_id');
require GForum::Forum;
GForum::Forum::get($fid);
}

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Transfert forum vars to a custom page In reply to
It works! But I needed to put in the URL "forum_id=<%forum_id%>" instead of "forum=<%forum_id%>".

Thank you very much!!

François Smile

Last edited by:

Franco: Jun 20, 2002, 6:56 AM