Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

page.cgi bug... or is it?

Quote Reply
page.cgi bug... or is it?
I don't know if this is a regular bug, but I just started using page.cgi and I am having trouble with the way it displays the links:

http://www.linkondemand.com/page.cgi

It replaces:
http://www.linkondemand.com/jump.cgi
with:
http://www.linkondemand.com/page.cgi?g=jump.cgi

It also does this with other things like add a page and modify a link etc...

How can I fix this. This is kind of urgent.

Thanks,

------------------
- Jonathan Gamble

www.magicdirectory.com


Quote Reply
Re: page.cgi bug... or is it? In reply to
If you are using page.cgi you need to use the RELATIVE (variable) path names, not hard-coded paths in the templates.

The regular build will work either way, but page.cgi will only work correctly if you use indirection.

Check your templates, make sure you are using:

build_new_url
build_cool_url
build_root_url
build_ratings_url
build_detail_url
db_cgi_url

in the templates.
Quote Reply
Re: page.cgi bug... or is it? In reply to
I am using those variables instead of typing them in manually...

Example
Code:
<ul>
<li><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>

<%if Description%>
<span class="descript">- <%Description%></span>
<%endif%>

<%if isNew%>
<small><sup class="new">new</sup></small>
<%endif%>

<%if isChanged%>
<small><sup class="new">update</sup></small>
<%endif%>

<%if isPopular%>
<small><sup class="pop">pop</sup></small>
<%endif%>

<small class="date">(Added: <%Add_Date%> Hits: <%Hits%> Rating: <%Rating%>
Votes: <%Votes%> ) <a href="<%db_cgi_url%>/rate.cgi?ID=<%ID%>">Rate It</a></small>

<%if isEditor%>
<small class="date">| <a href="<%db_cgi_url%>/maintain.cgi?modify_form=1&modify=<%ID%>">Edit</a>
| <a href="<%db_cgi_url%>/maintain.cgi?delete_form=1&delete=<%ID%>">Delete</a></small>
<%endif%>
</ul>

I'm thinking that it might have something to do with the cgi files resting in the main directory...

Puzzled,

------------------
- Jonathan Gamble

www.magicdirectory.com


Quote Reply
Re: page.cgi bug... or is it? In reply to
page.cgi requires that your html pages be built in a subdirectory, and not off of the root. This was neccessary so that no changes to the tempaltes would be required to switch from dynamic mode to static mode.

Cheers,

Alex