Page doesn't display properly
kentons - November 14, 2007 - 00:36
| Project: | KnowledgeTree integration |
| Version: | 5.x-3.1 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi,
I installed the newest version of the module and everything is working! However, when I click the DMS link I get KT showing up in a small window, no matter which of the default Drupal themes I'm using. I basically see the header and then have to scroll through everything else. I think I did everything in the install, but I think it must be something simple.
thanks,
Kenton

#1
Hi Kenton,
The Knowledge tree module is designed to load into a iframe on the page. It uses an iframe so you can keep all of your drupal menus around it. Basically this should give you the knowledge tree functionality with the same look and feel as your drupal site.
On sites where I use this module I have edited the standard_page.smarty (in templates/kt3 folder in knowledge tree) to remove (or comment out) the header and footer and anything that is unnecessary. Additionally I also tend to remove and sidemenus from the drupal template. You can do this by editing the page.tpl.php file (in your theme's directory). Just before you create the main body and sidebars etc... do something like this
<?php if($_GET['q']!='DMS') { ?>/* Then all the normal code to print the content and sidebars */
<?php } else { ?>
/* Just put the Knowledge tree iframe on the page */
<div id="dms">
<?php print $content; ?>
</div>
<?php } ?>
The exact way you do this depends upon how your template works.
Hope this helps,
Alex
#2
Hi all
I have found a problem with the iframe creation which stopped the height being adjusted properly, by changing the line:
$output .= '<iframe src="'. $path .'" id="kt_iframe" frameborder="0" onload="showiframe();';in kt.module to:
$output .= '<iframe src="'. $path .'" id="kt_iframe" frameborder="0" height="' . $height . '" onload="showiframe();';I now have the iframe sizing correctly according to the settings in the module admin without modifying any themes.
Changing the section:
if ($width && $height) {$output .= ' style="width: '. $width .';display:none;"';
}
had no affect.
The only problem is that I had to use an absolute value for the height, I couldn't get the % height value to work.