Page 1 of 1
How to show print detail page directly
Posted: 2013-05-11 09:32
by Helmonder
I use appgine for my website
www.arbeidsdeskundige.nl
Is it possible to show the print detail preview page directly when you select an item? And go back to the main page from there?
I would like to let the visitors come on the print detail page in one step
Visitors don't need te see the detail form
I 'll use the detail form only to fill the database with new partners
Re: How to show print detail page directly
Posted: 2013-05-12 08:27
by Helmonder
I use a wrong internet adres:
Helmonder wrote:I use appgine for my website
http://www.arbeidsdeskundigenodig.nl
Is it possible to show the print detail preview page directly when you select an item? And go back to the main page from there?
I would like to let the visitors come on the print detail page in one step
Visitors don't need te see the detail form
I 'll use the detail form only to fill the database with new partners
Re: How to show print detail page directly
Posted: 2013-05-21 20:51
by a.gneady
It's doable if you're willing to edit some code ... you should use the
tablename_init() hook to change
to a new table view template that links directly to the printable detail view in case the current user is not signed in ...
You'll also need to create that new table view template ... You can start with the original template at "templates/
tablename_templateTV.html" (where tablename is the name of the concerned table) and replace the <%%SELECT%%> placeholder with:
Code: Select all
<a href="tablename_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1">
and the <%%ENDSELECT%%> placeholder with:
I assumed in the above code that your table's primary key field is named
id ... You should change it in the above code if it's different.
Re: How to show print detail page directly
Posted: 2013-06-19 20:55
by MikeB
I tried following your instructions Ahmad, but could not get this to work. I’ll illustrate what I did with “TableAâ€. I want to print the detail view (via TableA_templateDVP.html) when I click on the table view record.
In TableA.php in the Hooks directory, I changed:
Code: Select all
function TableA_init(&$options, $memberInfo, &$args){
return TRUE;
to
Code: Select all
function TableA_init(&$options->Template, $memberInfo, &$args){
return TRUE;
I changed the template, TableA_template_TV.html using the original TableA_templateTV.html as a guide.
I replaced
placeholder with
Code: Select all
<a href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1">
and changed the
placeholder with
(all occurrences – see below)
Code: Select all
<td id="TableA-ResidentID-<%%VALUE(ResidentID)%%>" valign="top" class="TableA-ResidentID TableBodyNumeric"><a href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(ResidentID)%%></a></td>
<td id="TableA-LastName-<%%VALUE(ResidentID)%%>" valign="top" class="TableA-LastName TableBody"><a href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(LastName)%%></a></td>
<td id="TableA-FirstNames-<%%VALUE(ResidentID)%%>" valign="top" class="TableA-FirstNames TableBody"><a href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(FirstNames)%%></a></td>
When I try to open TableA in the browser, I get a blank screen. Where did I go wrong?
Re: How to show print detail page directly
Posted: 2013-07-01 01:27
by MikeB
Hi Guys. I might have made my question difficult/impossible to follow with the formatting here in my last question. I do need help.
I tried following the instructions to display the detail print view directly from the table view, but could not get it to work. I’ll illustrate what I did with “TableAâ€. I want to print the detail view (via TableA_templateDVP.html) when I click on the record in the table view..
In TableA.php in the Hooks directory, I changed:
function TableA_init(&$options, $memberInfo, &$args){
return TRUE;
to
function TableA_init(&$options->Template, $memberInfo, &$args){
return TRUE;
I changed the template, TableA_template_TV.html using the original TableA_templateTV.html as a guide.
I changed:
<td id="ResidentsOwners-ResidentID-<%%VALUE(ResidentID)%%>" valign="top"
class="ResidentsOwners-ResidentID
TableBodyNumeric"><%%SELECT%%><%%VALUE(ResidentID)%%><%%ENDSELECT%%></td>
<td id="TableA-LastName-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-LastName
TableBody"><%%SELECT%%><%%VALUE(LastName)%%><%%ENDSELECT%%></td>
<td id="TableA-FirstNames-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-FirstNames
TableBody"><%%SELECT%%><%%VALUE(FirstNames)%%><%%ENDSELECT%%></td>
to
<td id="TableA-ResidentID-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-ResidentID TableBodyNumeric"><a
href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(ResidentID)%%></a></td>
<td id="TableA-LastName-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-LastName TableBody"><a
href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(LastName)%%></a></td>
<td id="TableA-FirstNames-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-FirstNames TableBody"><a
href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(FirstNames)%%></a></td>
MY RESULTS
When I click on a record in the Table View, I get a blank HTML document. If I leave the ->Template change out of TableA.php, I get the detail print view, but with no values in it. Also, I can't get to the detail view, which users with edit permission will need to get to.
Any help would be appreciated. I tried to follow Ahmad's instructions, but obviously did something wrong.
Thanks,
Mike