cancel
Showing results for 
Search instead for 
Did you mean: 

empty space on website when call .phtml with php code

empty space on website when call .phtml with php code

Hello,

 

I want to use contact poppup from: http://webdesignpub.com/simple-modal-popup-contact-form/

 

If i test popup form  from my magento theme it is working:

http://www.domain.com/app/design/frontend/default/template_name/template/page/a-page.php

 

and if i put php code from a-page.php to empty .phtml in same directory shows empty space on web page when call static block from header or footer:

 

<?PHP

/*

    Contact Form from HTML Form Guide

    This program is free software published under the

    terms of the GNU Lesser General Public License.



*/

//1. First, include the file popup-contactform.php

require_once('popup-contactform.php');



//2. link to the style file contact.css

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">

<head>

      <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>

      <title>Contact us</title>

      <link rel="STYLESHEET" type="text/css" href="popup-contact.css">

</head>

<body onload="javascript&colon;fg_hideform('fg_formContainer','fg_backgroundpopup');">

<p>

This is an example page showing how to add the popup contact form to your website.

Click on the button below to open the popup.

</p>

<p>

<a href='javascript&colon;fg_popup_form("fg_formContainer","fg_form_InnerContainer","fg_backgroundpopup");'

><img border='0' src='contact-us-button.png' width='213' height='39' /></a>

</p>



<?PHP

//3. php include contactform-code.php at the end of the page



require_once('contactform-code.php');

?>



</body>

</html>

 

 

…I succesfuly call phtml file with static block (tested with some content):    

({{block type="core/template" template="/page/contact_pop.phtml"}})

And then call from footer or header this static block with:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_name')->toHtml();?>

 

Can anyone help?

 

Tnx,

A

1 REPLY 1

Re: empty space on website when call .phtml with php code

Hello alchan,

 

We think you have an error on the page.

 

In order to display it you can paste the following code into index.php file in root directory of your site:

 

Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);

Regards,

Plumrocket Team