Gossamer Forum
Home : Products : DBMan : Customization :

Calling from SSI but without &html_page_top and &html_page_botton

Quote Reply
Calling from SSI but without &html_page_top and &html_page_botton
Hi! i'm making change in my sites, and i want to call in the home page the last 4 records from DB with SSI.

I make this only change in sub html_view_succes:

from this code:
Code:
sub html_view_success {
# --------------------------------------------------------

my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
$in{'nh'} ? ($nh = $in{'nh'}) : ($nh = 1);

$page_title = "Lista";

# the code continue for printing each record in two columns

to this:
Code:
sub html_view_success {
# --------------------------------------------------------

my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
$in{'nh'} ? ($nh = $in{'nh'}) : ($nh = 1);

$page_title = "Lista";

if ($in{'view_ssi'}) {

for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
}

} else {
# the code continue for printing each record in two columns

I only try to print without the &html_page_top and &html_page_botton. Trying this mods make 500 Server Error only when use &view_ssi=1 in the querystring.

what i doing wrong? i repeat, i want to show the records without the TOP and BOTTON layouts.

Thanks.



------------------
Gustavo.
www.roldigital.com.ar/conjuros/
Quote Reply
Re: Calling from SSI but without &html_page_top and &html_page_botton In reply to
tired to wait, i try another code, but still don't work

now i use this:

$in{'view_ssi'} ? print "start" : &html_page_top;

# CODE FOR PRINTING RECORDS

$in{'view_ssi'} ? print "end" : &html_page_footer;
$in{'view_ssi'} ? print "end" : &html_page_botton;

when i add &view_ssi=1 to querystring this work, not every time, but i can't find a pattern when it's work or not.

could you check my site ?? here: http://www.roldigital.com.ar/...agos&uid=default

if you try some querys with or without &view_ssi=1, you would see the error.

PLS HELP!!!

Note: i call this var view_ssi, 'cause after make it work, i'll use it to call records from another page with different layout, to show it like a "what's new in THIS DATABASE"

thanks.

------------------
Gustavo.
www.roldigital.com.ar/conjuros/

[This message has been edited by RolDigital (edited May 04, 2000).]
Quote Reply
Re: Calling from SSI but without &html_page_top and &html_page_botton In reply to
Thanks LoisC! i use a mod from this threads you post above, i have to make some changes, but the mod html_view_ssi works better than my code.

I use it for my home page.



------------------
Gustavo.
www.roldigital.com.ar/conjuros/
Quote Reply
Re: Calling from SSI but without &html_page_top and &html_page_botton In reply to
I don't understand what you're doing. How are you calling the SSI?


------------------
JPD






Quote Reply
Re: Calling from SSI but without &html_page_top and &html_page_botton In reply to
RolDigital:

I don't have the answer to your question, but can provide you with some threads to check out regarding the use of SSI. The first one might be what you are looking for.

* http://www.gossamer-threads.com/scripts/forum/resources/Forum5/HTML/001090.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/001348.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/002408.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/002044.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/000549.html

Hope this helps you to find your solution Smile