Home : Products : DBMan SQL : Discussion :

Products: DBMan SQL: Discussion: Re: [Hank] Long + Short Display: Edit Log

Here is the list of edits for this post
Re: [Hank] Long + Short Display
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

Edit Log: