custom pages

prettem

Member
Hello,
I wrote a custom page (dashboard) with several iframes, but I dont have access to global variables in faq.php

<div class="chart-container">
<iframe width="820" height="600" src="include/custom_php_files/faq.php"></iframe>
<div class="legend">
<p></p>
</div>
</div>

1710409142276.png

if I use this: <?php if(!defined('custom_page_from_inclusion')) { die(); } ?> it comes up with a blank page and global variables are not set.
Calling faq.php directly as a menue link opens without any troubles.

I need the id_group ($_SESSION['logged_user_infos_ar']["id_group"]) to hide some button per user rights.
What can I do, thank you

best regards
Manuel
 

deep64blue

DaDaBIK Guru
I got the same results as you.

You can use the dadabik url (e.g. index.php?function=show_static_page&id_static_page=46) but then you get the menu as well.

I then tried just to create a iframe from a chart, I followed the standard steps:-

after having copied the "embed code":
- admin -> pages -> custom pages
- add page
- click on show/hide html content
- past the code here
- enable the page, save and assign permissions to the page

but I get the following:-

temi7ed.png


One for @eugenio as I'm a bit puzzled.
 

eugenio

Administrator
Staff member
Hello @prettem,
I don't understand what exactly you are trying to achieve.
When you create a custom page, you can't call the page directly (e.g. include/custom_php_files/faq.php), you have to use the DaDaBIK URL, but yes, this call the entire page, including the menu.

If you just need to show, in a custom (HTML or PHP) page a datagrid or a chart, that's a different goal and you can see how to do it here:

Best,
 
Top