Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Different add pages!

Quote Reply
Different add pages!
Hi,

I want to use more than one way to add a link.

I need one add-page similar to the normal add.html. And I need an extra add-page which holds more fields than the normal add.html (ie. add1.html). How can I do this?

Cheers
Root
Quote Reply
Re: [root777] Different add pages! In reply to
If your talking about 2 different db with different fields, then you are better off with 2 different links installations.

An idea (assuming you don't use community or payments) would be to:

- create the extra fields in linksSQL (have the default values null)
- create an extra add.html page that submits to the add.cgi with the extra fields listed

So, for one add the user goes to add.cgi with standard fields submitted.

For the other add, the user goes to add.html (which submits to add.cgi with the required parameters sent to the script) with the new fields displayed.

In other words, since the first page of add.cgi is simply a regular html page and requires no input (when category drop down lists are enabled), you can use have 2 input methods.

I'm sure I'm missing something important, but it seems logical to me.

Hope this helps,

- Jonathan
Quote Reply
Re: [root777] Different add pages! In reply to
Hi,

You can just create another form template - say include_detailedform.html - which includes the extra fields.

Then in your add template just use something like

<%if detailed%>
<%include include_detailedform.html%>
<%else%>
<%include include_form.html%>
<%endif%>

Then you just need to pass in &detailed=1 when you want the detailed form.
Quote Reply
Re: [afinlr] Different add pages! In reply to
Of course.....

It is so simple. I must have been blind. Thanks for your help.

Cheers
Quote Reply
Re: [afinlr] Different add pages! In reply to
duhhh! Sly

- Jonathan