Gossamer Forum
Home : Products : DBMan : Customization :

short-long display

Quote Reply
short-long display
I want to modify JP Denis short-long display slightly. I have embedded all my html within the html.pl file and this is fine as far as it goes. The problem is that I want my long_display to be totally different page format from the short display. Unfortunately the way that it is called from the sub html_view_success page seems to prevent this.

I tried moving the following part of the code above the <html> tag:

if ($maxhits == 1) {
&html_record_long(&array_to_hash(0, @hits));
}

else {

This worked fine for the top part of the display but for some inexplicable reason ( or inexplicable to me) it still displays the bottom part of the short display page with footers, etc. This means that I get the long_display page I want, but it still carries the bottom part of the short_display underneath it. Sticking in closing body and html tags in the long_display page doesnt help.

I want the long display to be totally different with no footers or anything else carrying over from the short-display page. Can anyone help on this?
Quote Reply
Re: [gazzer] short-long display In reply to
You're on the right track. Try moving the &html_footer up under the "else" tag and see what happens.

In view success you have this:
-----------------------------------

Top Part of HTML Page (headers, etc)

Middle Part of HTML Page (Get Record - short or long)

Bottom Part of HTML Page (footers, etc)


Change this layout to:
-----------------------------

(if long)
HTML Top part of Page (custom for long)
HTML Middle Part of Page (Get Record)
HTML Bottom Part of Page (custom for long)

(if short)
HTML Top part of Page (custom for short)
HTML Middle Part of Page (Get Record)
HTML Bottom Part of Page (custom for short)

The footer comes in from "&html_footer;" You may need to make a html_footer_long sub by copying the html_footer sub and then calling it into html_view_success by using &html_footer_long;

Play with moving things around and see what happens.

Another helpful hint is to place comment tags in each section or sub so you'll know what part of the script is being called into what.

Example:

<!---this section generated by html_footer-->
Quote Reply
Re: [Watts] short-long display In reply to
Thanks for your help on this one. I finally managed to fix it just by moving a curly bracket to below the short view success page. It means that I have 3 end curlys in a row, but it works. Whoopeee now I can finish of this design once and for all.

Sly