Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

New Template

Quote Reply
New Template
If I create a new template, how do you get it to display via the forums? For instance, I created a new html form that I want setup as a template to include the header, footer, etc. After creating the new page, I saved it in the template/default/local folder. However, I can't figure out how to display it. In Links SQL, it was p={page name} on the URL. That doesn't seem to work in GForum. Any ideas?

Sean
Quote Reply
Re: [SeanP] New Template In reply to
Hi Sean,

GForum intentionally doesn't allow you to directly pass in "page=template.html" to parse a template, but it is very easy to add a new do= action that can accomplish the same thing. To do so, go to the Setup -> Actions area of the admin panel, and add a new action by typing a name into the box. This will be the value used - for instance, if you type "my_test_action", .../gforum.cgi?do=my_test_action will display the page. After you hit "Add action" you'll be asked for the action details and permission:

Action Name - this is what you just entered
Description - this is what shows up on the "Who's Online" page when a user is viewing gforum.cgi?do=action_name
Enabled - can be used to disable an action without deleting it
Shown on Who's Online - if set to Hidden, it won't be displayed on the Who's Online page for the user
Page - this is the template that will be parsed, and is the only field that needs to be filled in.
Groups - if you want to restrict this action to certain users, you can do so by adding a new group, assigning the users to the group, then checking this box and selecting the group.
Minimum user status - this allows you to restrict the action to registered users or administrator-status users.

Once the action is added, you can use a link such as:

<a href="gforum.cgi?do=my_test_action;<%hidden_query%>">My Action</a>

to browse to the page (the '<%hidden_query%>' part is necessary for users who choose to log in without cookies).

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] New Template In reply to
Okay, I understand now... Thanks for your help!