Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Using category-specific template set for "ADD A LINK" page

Quote Reply
Using category-specific template set for "ADD A LINK" page
Hi.

I'm setting up a directory with Links
SQL 2.2.1. I want each top-level
category to have its own template set.

This is easy enough, but there's one
problem (which I think qualifies as
a bug): the "ADD A LINK" page doesn't
use the template set for the current
category; instead, it uses the default
template set.

I've confirmed this by changing the
add.html template in the default
template set, and verifying that the
change appears in the "ADD A LINK"
page.

I've also read the code, starting at
the add.cgi script, and progressing
from Links::User::Add::handle to
Links::SiteHTML::display (with a first
argument of "add"), and finally to
Links::SiteHTML::_compile. It is in
this last function that the template
set is chosen, and it's easy to see
that it doesn't check whether the
current category has a template set of
its own.

If Gossamer Threads agrees this is a
bug, then (while I could probably write
one myself) I would appreciate a fix.

Regards,

Excalibur.
Quote Reply
Re: [excalibur] Using category-specific template set for "ADD A LINK" page In reply to
Look at the thread I just responded to 'creating a login page for review writers '

You might be able to do something similar and generate different login pages by using the category ID variable

That would be a lot of code if you add it to the template, but you could use includes and have a different include for each template
Quote Reply
Re: [excalibur] Using category-specific template set for "ADD A LINK" page In reply to
Hi Excalibur

You could try calling the template set like:

cgi-bin/add.cgi?t=template1
cgi-bin/add.cgi?t=template2
cgi-bin/add.cgi?t=template2

There’s also a post at
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=261721;#261721

That may help.

Regards

minesite

Last edited by:

minesite: Feb 23, 2005, 6:54 AM
Quote Reply
Re: [minesite] Using category-specific template set for "ADD A LINK" page In reply to
Hi.

You're quite right -- I hadn't thought of that.
I knew about the `t' parameter, of course,
but somehow I didn't realise it could be
used in this case.

Thanks for the help,

Excalibur.
Quote Reply
Re: [excalibur] Using category-specific template set for "ADD A LINK" page In reply to
There are a few other issue’s with add success and different forms if required.

So be sure to read the post linked above and that should help out.

Regards

minesite