0
外面后,我有一个外部的网页说“test.php的”,我已经装在Magento的框架的网站页眉页脚&块这个外部页面页眉页脚&使用。一切工作正常,除了网址链接。这是我迄今为止所做的:链接是不正确加载页眉和页脚的Magento
include 'app/Mage.php';
Mage::app();
umask(0);
Mage::app()->loadArea('frontend');
Mage::getSingleton('core/session', array('name' => 'frontend'));
$layout = Mage::getSingleton('core/layout');
//load default xml layout handle and generate blocks
$layout->getUpdate()->load('default');
$layout->generateXml()->generateBlocks();
//load header
$headBlock = $layout->getBlock('head');
$headerBlock = $layout->getBlock('header');
echo $headBlock->toHtml() . $headerBlock->toHtml();
// load footer
$footerBlock = $layout->getBlock('footer');
echo $footerBlock->toHtml();
问题是此页面生成的url链接包括test.php在其基本url中。
说我有一个链接“关于我们”。在magento中为此链接生成的url是“http://localhost/myapp/index.php/about.html”但是为test.php上的同一链接生成的url是“http://localhost/myapp/test.php/about.html”。
这是怎么解决的?
OR
是否有任何其他方式来加载主题的页眉和页脚?
OR
有什么办法,我可以加载test.php的作为的Magento内的iframe,并通过URL参数?
本地主机链接将无法在其他计算机上工作,所以pleaase添加截图 – fresher
我已经添加了链接,以显示即:如何在index.php的区别被替换为magento之外的test.php。可能是关于基本网址。 – vartika