Magento Forum

   
Trying to insert small php code into frontpage and getting 404……
 
fastboxgaming
Sr. Member
 
Avatar
Total Posts:  101
Joined:  2008-10-11
 

RCSolution:
I have purchased the I-Dark Magento template, and am very impressed. The graphics are amazing.

I am having a small issue. I use a slideshow called Frontpage Slideshow(FPSS). It works fine on the old template I was using “Blue” from Magento, but whenever I try it on your template, it makes my frontpage go to a 404 error. I embed the code by editing the 3columbs.phtml in dreamweaver and adding the following code in the content section:

<!-- [start] content -->
            
<?php echo $this->getChildHtml('content'?>

<?php
    $nameOfSlideshowToDisplay 
"demoslideshow";                     
    
$URLofyoursite "http://www.fastboxgaming.com";                     
    
$AbsoluteServerPathofyoursite "/home/fastboxg/public_html";    
    include_once(
$AbsoluteServerPathofyoursite."/fpss/mod_fpslideshow.php");
?>
       
<!-- [end] content -->

I don’t understand why entering this code would cause the frontpage to do a 404 error. I have I-dark set as my default theme, and default as my default package. Under homepage in the CMS, I have made “custom” my default theme, and created a custom theme folder where I copied the 3columbs.phtml to with the needed changes to the homepage to add the slideshow to it.
When I remove the above code, my page loads fine. When I put it back, my page goes strait to 404……….

Do you have any thoughts on why this error is happening?

Thanks a lot
Joel
http://www.fastboxgaming.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
retif
Sr. Member
 
Total Posts:  171
Joined:  2008-08-16
Odessa, Ukraine
 

include_once is not a good idea in template file. try to make block from this slideshow thing

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top