Gossamer Forum
Home : Products : DBMan : Customization :

Displaying records on an outside page

Quote Reply
Displaying records on an outside page
Okay... I've gone through the FAQ and used what seemed to be what answers my question (SSI include), but it won't work.
http://www.gbcorporateexpressions.com/index.shtml
The lady I'm making this site for has no HTML knowledge whatsoever, but still wants to be able to update the site on her own. So I'm setting up databases that will make it so she just has to edit a form, and doesn't need any HTML knowledge at all.
Okay... so in the table cell on the right, there should be a featured gift section.
So, here's what I've got...




is in my index.shtml file where I want it. Then, in my html.pl file, I have:

Code:

sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.
my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);
my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';

$rec{'Description'} =~ s/\n/<BR>/g;
print qq|

<table style="border: #000000 solid 1 px" width="140" cellspacing="0" cellpadding="2">
<tr>
<td width="140" style="border-bottom: 1pt dashed #000000" bgcolor="#35B9B9"><b><font face="Verdana" size="2"><p align="right">Featured
Item</font></b></td>
</tr>
<tr>
<td width="140">
<font style="FONT-SIZE: 9pt" face="Verdana"><strong>$rec{'Gift'}</strong><br>
<img src="http://www.gbcorporateexpressions.com/images/$rec{'Picture'}" width="132" height="132" style="border-right: 1px #000000 solid; border-bottom: #000000 solid 1px"></p>
</font>
</td>
</tr>
<tr>
<td width="140"><font style="FONT-SIZE: 8pt" face="Verdana">$rec{'Description'}
</font></td>
</tr>
</table><p>

|;
}



and then

Code:

sub html_view_success {
# --------------------------------------------------------
# This page displays the results of a successful search.
# You can use the following variables when displaying your
# results:
#
# $numhits - the number of hits in this batch of results.
# $maxhits - the max number of hits displayed.
# $db_total_hits - the total number of hits.
# $db_next_hits - html for displaying the next set of results.
#

&html_record (&array_to_hash($_, @hits));
}



Can anyone tell me where I'm going wrong? I've never worked with SSI before, as you can probably tell. Thanks in advance for any help!
Quote Reply
Re: [Reyhan] Displaying records on an outside page In reply to
You're not getting the %rec hash filled. You do have records in there, don't you? (Just checking. :) )

I would make sure that you have the whole script working before trying to deal with SSI, although it does look like the SSI is working fine.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Displaying records on an outside page In reply to
Well... I fixed it. I'm not sure what I changed that made it work... but it works now, lol. Thanks!
Quote Reply
Re: [Reyhan] Displaying records on an outside page In reply to
Sometimes you just need to ask for help and it fixes itself. It's also very helpful sometimes to turn around three times and say "ooga booga". Wink

All that matters is that it works.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.