Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Template for add.cgi

Quote Reply
Template for add.cgi
Hello all,

Is it possible to customize the add.cgi template by something else like add_auto.html instead of add.html if i entering add.cgi?t=add_auto ?

Please help.
Quote Reply
Re: [reenee] Template for add.cgi In reply to
"add.html" is hard coded. You'd have to make those changes. Are you trying to use different add.html templates?


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Template for add.cgi In reply to
Thanks pugdog,

yes, i trying to use other than add.html as default, simply like each category have theyre own add form, is it possible if i can make the command like add.cgi?t=add_auto to open add_auto.html template ?
Quote Reply
Re: [reenee] Template for add.cgi In reply to
Anybody out there ?

Help me please ....

Thanks.
Quote Reply
Re: [reenee] Template for add.cgi In reply to
make new directory in templates with name auto and then put add.html on it

add.cgi?t=auto whill work
Quote Reply
Re: [Troja] Template for add.cgi In reply to
the problem with that will be with dynamic sites. the t= value will continue to be passed. With static sites, this isn't a problem, it will be dropped on the first display of a static page.

The way to do this would be to modify add.cgi/add.pm itself, and just remember to make the same changes for any upgrades.

You'd want to set in the category record for any category that will have one, a new template to use for add.html. prior to calling add.html you want to check the current category record for a custom add template, if so, replace the call to add.html with that one.

If you only want a few different add.html forms, then you could use a series of "if" tests to pick the form to display and add it to the add.pm file.

If you have a lot of sites, you'd want to use some naming convention based on the category ID, such as add_<%category_ID%>.html as the file.

Hope this gives you a start.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.