Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [Hank] Long + Short Display

Quote Reply
Re: [Hank] Long + Short Display In reply to
Hi Hank,
In Reply To:
This thing is cool
Thanks Laugh

In Reply To:
What does the detail=1 mean?
That is avariable to know when it will show the detail page. You can use whatever, but make sure:
<%if whatever%>
....
<%include record_detail.html%>
...
<%endif%>

In Reply To:
I am trying to give different users a different details, and I can do it hard way, but this detail=1 is interesting, if it does what I think it does... Could not find any help on this.

For instance, you can find follow the instructions:
1. Add a field (Eg. tpl_detail) in your User table (goto Editor - Users - Customize ...), that field will be saved the detail pages. (Eg. Record_detail1.html, record_detail2.html...)

2. Add tpl_include into Global template:

sub {
my $tags = shift;
my $template = $tags->{template} || $CFG->{template};
my $pg = $tags->{tpl_detail};
my $root = "$CFG->{admin_root_path}/templates/$template";
GT::Template->parse ( $pg, $tags, { print => 0, root => $root } );
}

3. Modify search_results.html file:
<%if detail%>
<%loop results%>
<%if tpl_detail%>
<%tpl_include%>
<%else%>
<%Dbsql::HTML::generate_search_results%>
<%endif%>
<%endloop%>
<%endif%>

Cheers,
TheStone

B.

Last edited by:

TheStone: Nov 13, 2001, 10:41 AM
Subject Author Views Date
Thread Long + Short Display lubatico 5440 Aug 20, 2001, 8:26 AM
Thread Re: Long + Short Display
911 5335 Aug 20, 2001, 9:47 AM
Thread Re: [911] Long + Short Display
Suomi 5180 Nov 9, 2001, 7:58 AM
Thread Re: [Hank] Long + Short Display
604 5186 Nov 9, 2001, 10:05 AM
Thread Re: [TheStone] Long + Short Display
Suomi 5189 Nov 9, 2001, 11:08 AM
Post Re: [Hank] Long + Short Display
604 5176 Nov 9, 2001, 11:26 AM
Thread Re: [911] Long + Short Display
Bearwithme 5131 Nov 10, 2001, 9:48 AM
Thread Re: [Bearwithme] Long + Short Display
604 5142 Nov 12, 2001, 10:13 AM
Thread Re: [TheStone] Long + Short Display
Suomi 5110 Nov 12, 2001, 11:53 AM
Thread Re: [Hank] Long + Short Display
604 5133 Nov 13, 2001, 10:37 AM
Post Re: [TheStone] Long + Short Display
Suomi 5085 Nov 14, 2001, 6:47 AM
Post Re: [TheStone] Long + Short Display
Bearwithme 5129 Nov 12, 2001, 4:14 PM
Post Re: Long + Short Display
santana 5300 Aug 21, 2001, 2:46 AM