Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How can I add two to three more links on my detailed page.

Quote Reply
How can I add two to three more links on my detailed page.
How can I add two to three more links on my detailed page.

I would like the user to add his/her website and have the ability to show up to four of there urls related to there site on the detailed page.

For instance if the add there businesses main site, then their employment page, and the option of adding two others, products page etc..

So the detail page would show the title, main url, employment url, and two other optional urls.

Thanks, Ken
Quote Reply
Re: [ken707] How can I add two to three more links on my detailed page. In reply to
You need to add an extra column to your Links table for each extra url you want to be able to show. And then you can just add the name of the column as a tag on your detailed page to show the data. See the manual for how to add a column if you haven't done this before.

You will then need to add this field to your include_form template so that the user can enter the information when they add their link.
Quote Reply
Re: [afinlr] How can I add two to three more links on my detailed page. In reply to
Thanks, that worked great.

I have one more question. I have set this up and it works.

Now, how can I make my second url refer to the main url if they there isnt a second url on my old links.

Another words, I already have links in my database and I have just activated the detail pages and made these changes but my old links don't have the second and third urls.

So how can i make the second and third urls that i added to the links table to refer to the main link if there is no second or third url.


I hope that make s sense.

Last edited by:

ken707: Apr 17, 2004, 8:50 PM
Quote Reply
Re: [ken707] How can I add two to three more links on my detailed page. In reply to
Hello ken707

Try to looking at the if statement to print your second or third url's on your detailed page, i think you should have some if's on your detailed page template and just print the url's in case the website have more than 1.

Hope this help you or at least give you a clue ;)

Jesus
Ps. If there's a better way to do this, it will be great also for me to know it, as this its normally the way I'm working with my templates ;)
Quote Reply
Re: [ken707] How can I add two to three more links on my detailed page. In reply to
Hi,

Jesus is right.

Try this

<%if URL2%><%URL2%><%elsif URL1%><%URL1%><%else%><%URL%><%endif%>

where URL2 and URL1 are the names of the url fields you have just added.