Hi Hank,
In Reply To:
This thing is cool
Thanks
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.