Gossamer Forum
Home : Products : Gossamer Links : Discussions :

THE LIGHT GOES ON!!

Quote Reply
THE LIGHT GOES ON!!
I've been trying to figure out why things changed so much in the code.

I'm pretty sure it has to do with _LOOP_ in the templates!

If you are sending an array of hashes to the template routine, you MUST use a loop variable, as described in:

http://gossamer-threads.com/p/125631

This means looking at the "default" templates included in the tar, and then mking the changes to your own templates if you need to.

For example, on your modify.cgi, if you are seeing something like:

ARRAY(0x42342)

Rather than your links, you need to edit your modify_select.html to look something like:

replace the <%link_results%> with:

<%loop link_results%>
<P><%include link.html%>
<%endloop%>

What that does, is iterate through the link_results array of hashes, and parses the link.html template for each one.

This is a _CHANGE_ in that the <%link_results%> variable is no longer holding the HTML all ready to go, but rather an array of pointers to the RAW DATA, and the processing occurs in the template.

This lets you do a lot more creative formatting, but it also means you probably have to make changes to various templates -- modify, search, etc that accepted the <%results%> tag, and just expected HTML rather than an array.

This is _PROBABLY_ the problems with the spider results also.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: THE LIGHT GOES ON!! In reply to
Ok,

You _ALSO_ need to create a modify_link.html which is a stripped down version of your link.html.

In this, you want to link the title to "../modify.cgi?LinkID=<%ID%>"

That will allow the user to pick the link they want to modify by clicking on the title.

ALSO --- the "form" tags are now extraneous, ie: the "modify" button. The modify_select.html for is not POSTed, it's just a link to display the requested link. _THAT_ form ie: modify.cgi is "posted".

Anyway, hopefully this confusion will be straightened out in the next release.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum