Gossamer Forum
Quote Reply
URL not required
I would like to turn off URL being required when someone uses the add form. How is this done?

Can I replace the URL with a default with the <%Title%> somewhere within the URL?

e.g. http://www.domain-name.com/<%Title%>.html
Quote Reply
Re: [troyid] URL not required In reply to
Rather than that, what has worked for me, on various sites, is to use http:// as a "non" url.

Then, you can do

<%if URL ne 'http://'%>
<%db_cgi_url%>/jump.cgi?ID=<%ID%>
<%else%>
go somewhere else, link to detail page, etc,
<%endif%>


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] URL not required In reply to
Sorry but I don't think thats what I need.

I would still like an URL to be generated for the link but I don't want the user to add the URL, rather I would like it to be automatically generated by Links. I seen in the SQL database that there is a field called URL (Link properties)and within this field you can setup a default URL. Would this be applicable to what I require?

How do I get around the add form requesting that an URL be entered?
Quote Reply
Re: [troyid] URL not required In reply to
In Reply To:
How do I get around the add form requesting that an URL be entered?

go to the table properties in the admin area and make it not required. enter in the default you want. then edit the user add (modify etc) and just make the url a hidden field, or don't include it at all - then the system should automatically insert the default.
Quote Reply
Re: [ryel01] URL not required In reply to
thanks for your suggestion ryel01, but I think I have already done this.

I have checked no for not null and entered the default as http://www.domain-name.com/<%Title%>.html

I have also deleted <%URL%> from my add.html file.

Should this work?
Quote Reply
Re: [troyid] URL not required In reply to
give it a go! Smile

you might have problems if the user enters a space in their site title though? might need a global of some sort to strip spaces and funny characters that could cause problems.

then of course you'd need to make sure you have <%Title%>.html - I'm not sure how you'd get the system to make that!