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

Need help Please?

Quote Reply
Need help Please?
Hello,

I am using the links system for an articles directory.

I have added three types of text fields to be filled in for each article or resource.
1. Full text
2. Abstract
3. Author Info

I want to do this....If the user went to a category and saw the resources in that category, each resource would have three links to view: Full text, abstract, and author info. I want the user to be able to view, within my site (like a detailed page) the data they choose with out the other data being there.

Maybe seperate detailed pages for each resource.

How would I do this?

------------------
James L. Murray
PaintballCity.com
The Yahoo of Paintball
www.paintballcity.com
AIM: Paintball City
ICQ: 44147229





Quote Reply
Re: Need help Please? In reply to
Depending on the anticipated traffic, this seems like a job for a merger of "jump.cgi" and "search.cgi"

You want to pass jump.cgi a parameter that tells it the ID and FORMAT of the page you want, then you want to yank the link information, and output a page.

When you build your pages, in your detailed.html and/or link.html you want to give the user the 3 options to click:

short == <%db_cgi_url%>\jump.cgi?ID=<%ID%>&FORMAT=short
medim == <%db_cgi_url%>\jump.cgi?ID=<%ID%>&FORMAT=medium
long == <%db_cgi_url%>\jump.cgi?ID=<%ID%>&FORMAT=long


In jump.cgi you want to test for the "FORMAT" parameter, and see which it is. You then want to set a flag value like:

$format = 'long' (or 'short' or 'medium' depending on what the $FORMAT value is.

You then want to yank the link data and pass it to the appropriate template, using a call to the appropriate &load_template call.

In this case, it would look something like:


&site_html_detailed_page ({ format => $format, %in, %rec }, $dynamic)



Now, in your detailed page, you just need to change the output area where you would put the "description" or whatever to look like:

<%if format eq 'long'%>
<%Full_text%>
<%endif%>
<%if format eq 'short'%>
<%Abstract%>
<%endif%>
<%if format eq 'author'%>
<%Author_Info%>
<%endif%>


Remember, if you pass the link values (and anything else) in the hash, those values are automatically available as tags in the templates.

You'd have one output template, and the only changes you'd need is to "jump.cgi" to figure out how to deal with the input, and to your link.html and/or detailed.html to put the links for the choice.

Make sense?





Quote Reply
Re: Need help Please? In reply to
BTW -- if your detailed page views (abstracts) etc are a good portion of your traffic, and you don't want to do this dynamic output, you could modify the nph_build.cgi to build the 3 pages (with 3 calls to the &site_html_detailed_page routine, with each of the 3 "format" parameters). Everything else would be the same, since you'd still have to get to the pages .... and jump.cgi would simply re-direct you to the detailed page based on the "format" tag, rather than build the page dynamically.

Quote Reply
Re: Need help Please? In reply to
PugDog - You rock...thanks for your help. I think doing it second way would be the best.

This is going to be a large portion of the traffic on our site.

I have to check out the code to see what you mean. Hopefully I can figure it out. Smile

Thanks.

------------------
James L. Murray
PaintballCity.com
The Yahoo of Paintball
www.paintballcity.com
AIM: Paintball City
ICQ: 44147229





Quote Reply
Re: Need help Please? In reply to
Hello PugDog,

I'm having a bit of trouble with this trying to get jump.cgi to dynamically go to the detailed page and display the data depending on the format.

Can you please maybe give more perl novice detailed directions. Sorry if this sonds silly.

Thanks.

------------------
James L. Murray
PaintballCity.com
The Yahoo of Paintball
www.paintballcity.com
AIM: Paintball City
ICQ: 44147229





Quote Reply
Re: Need help Please? In reply to
Hi,

Do you have a snip of the code you are trying? Or where the problem is?

(I had to take the weekend off.... and Mondays are never good for me).