I have 2 tables and I need to know if it is possible to include data from both tables in the same page? I understand it will take some coding to do this but I need to know how much of a challenge it will be, if it is even possible.
Thanks, TD
Using data from two tables in page
Re: Using data from two tables in page
If this is just for display, simplest solution could be creating a custom page with two iframes, each loading a tableview in Embedded mode. This can be done in 5 minutes, I think.
But if you need to work with data of both tables this will become more complicated. For example if selecting records in one table shall filter records in the other table. I don't know about your usecase.
But if you need to work with data of both tables this will become more complicated. For example if selecting records in one table shall filter records in the other table. I don't know about your usecase.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityRe: Using data from two tables in page
I'm sorry, my previous answer (which I cannot edit any more) was wrong.
I have just tested it. It is no problem to add two iframes and to load Detail Views in
But the problem is:
TableView does not support
Here is the simple version with two embedded table views (tables: tasks, projects) in two iframes as a starting point:
I am going to post another article in a few minutes showing how to get rid of the navbars inside the iframes automatically. Stay tuned.
I have just tested it. It is no problem to add two iframes and to load Detail Views in
Embedded
mode or any other page. But the problem is:
TableView does not support
Embedded=1
parameter. I forgot about this. This means when loading TableView into iframe, the navbar and menus will be visible. Removing them has to be done differently, for example by using Javascript.Here is the simple version with two embedded table views (tables: tasks, projects) in two iframes as a starting point:
Code: Select all
<?php
include("lib.php");
include("header.php");
?>
<style>
iframe {
width: 100%;
min-height: 40vh;
}
</style>
<iframe src="tasks_view.php"></iframe>
<hr/>
<iframe src="projects_view.php"></iframe>
<?php
include("footer.php");
I am going to post another article in a few minutes showing how to get rid of the navbars inside the iframes automatically. Stay tuned.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityRe: Using data from two tables in page
OK, here is a solution for showing two table views in the same (custom) page without navbars.
(1) Create custom page
(2) Remove navbar in iframed-pages
Result
PS: I have to admit, it did take longer than the announced 5 minutes. Anyway, I hope this helps or at least gives a starting point.
(1) Create custom page
Code: Select all
<?php
// file: test_iframes.php
// custom page in project-root directory
include("lib.php");
include("header.php");
?>
<style>
iframe {
width: 100%;
min-height: 40vh;
display: none;
}
</style>
<iframe src="tasks_view.php" onload="$j(this).fadeIn()"></iframe><br />
<iframe src="projects_view.php" onload="$j(this).fadeIn()"></iframe>
<?php include("footer.php");
Code: Select all
<!-- file: hooks/footer-extras.php -->
<script>
jQuery(function() {
if (window.frames.length == 0 && window.parent.frames.length > 0)
jQuery(".users-area > nav.navbar").remove();
});
</script>
PS: I have to admit, it did take longer than the announced 5 minutes. Anyway, I hope this helps or at least gives a starting point.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityRe: Using data from two tables in page
If you, like me, dislike the gap at the top of the iframe's content which remains visible after removing the navbar, ...
... you can also remove the element ".top-margin-adjuster". Here is the modified code for
(2) Remove navbar and top-margin in iframed-pages
Result
... you can also remove the element ".top-margin-adjuster". Here is the modified code for
hooks/footer-extras.php
:(2) Remove navbar and top-margin in iframed-pages
Code: Select all
<!-- file: hooks/footer-extras.php -->
<script>
jQuery(function() {
if (window.frames.length == 0 && window.parent.frames.length > 0) {
jQuery(".users-area > nav.navbar").remove();
jQuery(".top-margin-adjuster").remove();
}
});
</script>
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityRe: Using data from two tables in page
Thank you Jan, will try these !
TD
TD